mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-03 01:22:55 +01: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.
|
// Skip copies of directories/files not found.
|
||||||
} else {
|
} else {
|
||||||
String cleanedFilename = BrutIO.sanitizeUnknownFile(out, fileName);
|
String cleanedFilename = BrutIO.sanitizeUnknownFile(out, fileName);
|
||||||
File outFile = new File(out, cleanedFilename);
|
if (! cleanedFilename.isEmpty()) {
|
||||||
//noinspection ResultOfMethodCallIgnored
|
File outFile = new File(out, cleanedFilename);
|
||||||
outFile.getParentFile().mkdirs();
|
//noinspection ResultOfMethodCallIgnored
|
||||||
BrutIO.copyAndClose(in.getFileInput(fileName), Files.newOutputStream(outFile.toPath()));
|
outFile.getParentFile().mkdirs();
|
||||||
|
BrutIO.copyAndClose(in.getFileInput(fileName), Files.newOutputStream(outFile.toPath()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (RootUnknownFileException | InvalidUnknownFileException | TraversalUnknownFileException exception) {
|
} catch (RootUnknownFileException | InvalidUnknownFileException | TraversalUnknownFileException exception) {
|
||||||
LOGGER.warning(String.format("Skipping file %s (%s)", fileName, exception.getMessage()));
|
LOGGER.warning(String.format("Skipping file %s (%s)", fileName, exception.getMessage()));
|
||||||
|
Loading…
Reference in New Issue
Block a user