Sfoglia il codice sorgente

Bug 1648: It is not possible to delete symlink pointing to a directory with "Follow symbolic links to directories" session settings being on

https://winscp.net/tracker/1648

Source commit: da5941ea8fcb38c2a171e50ce9415985f6589622
Martin Prikryl 7 anni fa
parent
commit
62d075dc43
2 ha cambiato i file con 1 aggiunte e 5 eliminazioni
  1. 0 4
      source/core/FtpFileSystem.cpp
  2. 1 1
      source/core/Terminal.cpp

+ 0 - 4
source/core/FtpFileSystem.cpp

@@ -4109,10 +4109,6 @@ bool __fastcall TFTPFileSystem::HandleListData(const wchar_t * Path,
   else
   {
     DebugAssert(FFileList != NULL);
-    // This can actually fail in real life,
-    // when connected to server with case insensitive paths.
-    // Is empty when called from DoReadFile
-    DebugAssert(FFileList->Directory.IsEmpty() || UnixSamePath(AbsolutePath(FFileList->Directory, false), Path));
     DebugUsedParam(Path);
 
     for (unsigned int Index = 0; Index < Count; Index++)

+ 1 - 1
source/core/Terminal.cpp

@@ -3599,7 +3599,7 @@ bool __fastcall TTerminal::DeleteContentsIfDirectory(
       throw;
     }
   }
-  return Dir;
+  return Dir && !File->IsSymLink;
 }
 //---------------------------------------------------------------------------
 void __fastcall TTerminal::ProcessDirectory(const UnicodeString DirName,