Kaynağa Gözat

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
(cherry picked from commit 62d075dc43631e154cb9419a349457c41d92ca96)

Source commit: 2c85b3f83f33f22a1128ec00dd3e62d49df65a07
Martin Prikryl 7 yıl önce
ebeveyn
işleme
2e891e4c82
2 değiştirilmiş dosya ile 1 ekleme ve 5 silme
  1. 0 4
      source/core/FtpFileSystem.cpp
  2. 1 1
      source/core/Terminal.cpp

+ 0 - 4
source/core/FtpFileSystem.cpp

@@ -4096,10 +4096,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

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