Когда я выполняю «zip -FF /Users/myZip.zip? --Out Users / myFixed.zip» в моем терминале Mac, поврежденный 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)