浏览代码

Empty kpidPath is not an error, see Client7z.cpp. Happens when extracting a .gz or .xz (and more?) because they aren't really archives but just compressed files.

Martijn Laan 3 月之前
父节点
当前提交
582557df41
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Projects/Src/Compression.SevenZipDLLDecoder.pas

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

@@ -275,7 +275,8 @@ begin
       var ItemPath: OleVariant;
       var Res := FInArchive.GetProperty(index, kpidPath, ItemPath);
       if Res <> S_OK then Exit(Res);
-      if ItemPath = '' then Exit(E_FAIL);
+      if ItemPath = '' then
+        ItemPath := PathChangeExt(FExtractedArchiveName, '');
       var IsDir: OleVariant;
       Res := FInArchive.GetProperty(index, kpidIsDir, IsDir);
       if Res <> S_OK then Exit(Res);