Kaynağa Gözat

Fix restore behaviour with zip files

Reinier Olislagers 11 yıl önce
ebeveyn
işleme
db9b1e94de
1 değiştirilmiş dosya ile 8 ekleme ve 8 silme
  1. 8 8
      backuprestore.pas

+ 8 - 8
backuprestore.pas

@@ -163,18 +163,18 @@ begin
         if cbOperation.ItemIndex = 0 then
           StartBackup
         else
-        begin
           StartRestore;
-          // Delete temp file when restore from zip is done
-          if TempFile<>'' then
-          begin
-            Sleep(40); //give file system chance to update locks etc
-            DeleteFile(TempFile);
-          end;
-        end;
 
         while ServiceQuery(Res) do
           meLog.Lines.Add(Res);
+
+        if (TempFile<>'' {using zip file}) and
+          (cbOperation.ItemIndex <> 0 {restore}) then
+        // Delete temp file when restore from zip is done
+        begin
+          Sleep(40); //give file system chance to update locks etc
+          DeleteFile(TempFile);
+        end;
       finally
         DetachService;
       end;