Prechádzať zdrojové kódy

Don't continue if SetCurrentDir fails.

Martijn Laan 11 mesiacov pred
rodič
commit
1d270afdc2

+ 2 - 1
Projects/Src/Compression.SevenZipDecoder.pas

@@ -195,7 +195,8 @@ function SevenZipDecode(const FileName, DestDir: String;
   const FullPaths: Boolean): Integer;
 begin
   var SaveCurDir := GetCurrentDir;
-  SetCurrentDir(DestDir);
+  if SetCurrentDir(DestDir) then
+    Exit(-1);
   try
     LogBuffer := '';
     Result := IS_7zDec(PChar(FileName), FullPaths);