1
0
Эх сурвалжийг харах

Bug 1546: On VMS servers, do not use absolute paths with DELE command (2nd)

https://winscp.net/tracker/1546

Source commit: fe0d54d899d3db357f3899d1b0a3d39451843638
Martin Prikryl 8 жил өмнө
parent
commit
cae4c0255c

+ 5 - 4
source/core/FtpFileSystem.cpp

@@ -866,17 +866,18 @@ UnicodeString __fastcall TFTPFileSystem::ActualCurrentDirectory()
 //---------------------------------------------------------------------------
 void __fastcall TFTPFileSystem::EnsureLocation(const UnicodeString & Directory, bool Log)
 {
-  if (!UnixSamePath(ActualCurrentDirectory(), Directory))
+  UnicodeString ADirectory = UnixExcludeTrailingBackslash(Directory);
+  if (!UnixSamePath(ActualCurrentDirectory(), ADirectory))
   {
     if (Log)
     {
       FTerminal->LogEvent(FORMAT(L"Synchronizing current directory \"%s\".",
-        (Directory)));
+        (ADirectory)));
     }
 
-    DoChangeDirectory(Directory);
+    DoChangeDirectory(ADirectory);
     // make sure FZAPI is aware that we changed current working directory
-    FFileZillaIntf->SetCurrentPath(Directory.c_str());
+    FFileZillaIntf->SetCurrentPath(ADirectory.c_str());
   }
 }
 //---------------------------------------------------------------------------