Bläddra i källkod

Bug 1462: Failure when moving "Download and Delete" operation to background (2nd try)

https://winscp.net/tracker/1462
(cherry picked from commit e163377bcfcdf112a2ac20977f0c29ca0a097606)

Source commit: 1191bf3e69e4edf35c6fe9af07ec9f92c2f421f0
Martin Prikryl 8 år sedan
förälder
incheckning
7a16001f4c
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      source/core/RemoteFiles.cpp

+ 2 - 1
source/core/RemoteFiles.cpp

@@ -1482,10 +1482,11 @@ void __fastcall TRemoteFileList::AddFile(TRemoteFile * File)
 TStrings * __fastcall TRemoteFileList::CloneStrings(TStrings * List)
 {
   std::unique_ptr<TStringList> Result(new TStringList());
+  Result->OwnsObjects = true;
   for (int Index = 0; Index < List->Count; Index++)
   {
     TRemoteFile * File = static_cast<TRemoteFile *>(List->Objects[Index]);
-    Result->AddObject(List->Strings[Index], File);
+    Result->AddObject(List->Strings[Index], File->Duplicate(true));
   }
   return Result.release();
 }