Browse Source

HPCC-18556 Ensure url /c$ (and similar) are translated.

Translate in CRemoteFile object, i.e. only translate when
remote access via dafilesrv is required.

Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
Jake Smith 7 years ago
parent
commit
1cbb39f790
1 changed files with 5 additions and 0 deletions
  1. 5 0
      common/remote/sockfile.cpp

+ 5 - 0
common/remote/sockfile.cpp

@@ -1706,6 +1706,11 @@ public:
         : CRemoteBase(_ep, _filename)
     {
         flags = ((unsigned)IFSHread)|((S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)<<16);
+        if (filename.length()>2 && isPathSepChar(filename[0]) && isShareChar(filename[2]))
+        {
+            VStringBuffer winDriveFilename("%c:%s", filename[1], filename+3);
+            filename.set(winDriveFilename);
+        }
     }
 
     bool exists()