Selaa lähdekoodia

HPCC-9664 dfu copy of files generating odd names

Move StringBuffer for logical file name outside the local block to keep
its content.

Signed-off-by: Attila Vamos <attila.vamos@gmail.com>

Added comment

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Attila Vamos 12 vuotta sitten
vanhempi
commit
7cf981261d
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      esp/services/ws_fs/ws_fsService.cpp

+ 1 - 1
esp/services/ws_fs/ws_fsService.cpp

@@ -2330,9 +2330,9 @@ bool CFileSprayEx::onCopy(IEspContext &context, IEspCopy &req, IEspCopyResponse
             }
         }
 
+        CDfsLogicalFileName lfn; // NOTE: must not be moved into block below, or dstname will point to invalid memory
         if (!bRoxie)
         {
-            CDfsLogicalFileName lfn;
             if (!lfn.setValidate(dstname))
                 throw MakeStringException(ECLWATCH_INVALID_INPUT, "invalid destination filename");
             dstname = lfn.get();