【发布时间】:2019-07-04 05:31:07
【问题描述】:
当我在我的 Mac 终端中执行“zip -FF /Users/myZip.zip?--out Users/myFixed.zip”时,损坏的 zip 文件已修复。 当我尝试修复与下面相同的损坏的 zip 文件时,它给了我以下错误。
请分享您的意见以解决此问题。
代码:
ProcessBuilder pb1 = new ProcessBuilder("bash", "-c", "zip -FF/Users/myZip.zip
--out /Users/myFixed.zip");
pb1.redirectErrorStream(true);
Process p =pb1.start();
错误信息:
1 Fix archive (-FF) - salvage what can
2 zip warning: could not open input archive: /Users/myZip.zip
3 Scanning for entries...
4 Could not find: /Users/myZip.z01
5
6
7 Hit c (change path to where this split file is)
8 s (skip this split)
9 q (abort archive - quit)
10 e (end this archive - no more splits)
11 z (look for .zip split - the last split)
【问题讨论】:
-
zip warning: could not open input archive: /Users/myZip.zip- 我想该文件实际上低于/Users/<username>/ -
无论我把 (/Users/
/ or /Users/ 损坏的文件放在哪里,我都只能修复损坏的文件通过/Desktop/) zip -FF broken.zip --out fixed.zip命令在mac 终端中,但它在我的程序中不起作用@ScaryWombat -
看下面的答案