Browse Source

Merge pull request #5176 from jakesmith/hpcc-10485

HPCC-10485 - Remove legacy /c$ pathing

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 11 years ago
parent
commit
1519590ca1
1 changed files with 5 additions and 16 deletions
  1. 5 16
      thorlcr/thorutil/thormisc.cpp

+ 5 - 16
thorlcr/thorutil/thormisc.cpp

@@ -586,24 +586,12 @@ public:
     }
     void setTempDir(const char *name, const char *_tempPrefix, bool clear)
     {
+        assertex(name && *name);
         CriticalBlock block(crit);
         assertex(tempdir.isEmpty()); // should only be called once
         tempPrefix.set(_tempPrefix);
-        StringBuffer base;
-        if (name&&*name) {
-            base.append(name);
-            addPathSepChar(base);
-        }
-        else
-        {
-#ifdef _WIN32
-            base.append("c:\\thortemp");
-#else
-            base.append("/c$/thortemp");
-#endif
-            base.append("_").append(globals->queryProp("@name"));
-            addPathSepChar(base);
-        }
+        StringBuffer base(name);
+        addPathSepChar(base);
         tempdir.set(base.toCharArray());
         recursiveCreateDirectory(tempdir);
 #ifdef _WIN32
@@ -616,7 +604,8 @@ public:
             unsigned d = getPathDrive(tempdir);
             if (d>1)
                 altallowed = false;
-            else {
+            else
+            {
                 StringBuffer p(tempdir);
                 alttempdir.set(setPathDrive(p,d?0:1).str());
                 recursiveCreateDirectory(alttempdir);