mirror of
https://github.com/revanced/Apktool.git
synced 2024-08-27 17:51:10 +02:00
fix: skip files if cleaned to empty filename (#3166)
This commit is contained in:
parent
ba2f1283ed
commit
3fdc06a46f
@ -89,10 +89,12 @@ public class DirUtil {
|
||||
// Skip copies of directories/files not found.
|
||||
} else {
|
||||
String cleanedFilename = BrutIO.sanitizeUnknownFile(out, fileName);
|
||||
File outFile = new File(out, cleanedFilename);
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
outFile.getParentFile().mkdirs();
|
||||
BrutIO.copyAndClose(in.getFileInput(fileName), Files.newOutputStream(outFile.toPath()));
|
||||
if (! cleanedFilename.isEmpty()) {
|
||||
File outFile = new File(out, cleanedFilename);
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
outFile.getParentFile().mkdirs();
|
||||
BrutIO.copyAndClose(in.getFileInput(fileName), Files.newOutputStream(outFile.toPath()));
|
||||
}
|
||||
}
|
||||
} catch (RootUnknownFileException | InvalidUnknownFileException | TraversalUnknownFileException exception) {
|
||||
LOGGER.warning(String.format("Skipping file %s (%s)", fileName, exception.getMessage()));
|
||||
|
Loading…
Reference in New Issue
Block a user