mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
[platform] ignoring Compressor visitor exceptions from entries rejected by a filter (EA-1405666)
GitOrigin-RevId: d8a99dc32cd1795e8a495fe34338baa92b1ba21e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
fbb24c0548
commit
6af7fb681a
@@ -352,6 +352,15 @@ public abstract class Compressor implements Closeable {
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {
|
||||
String name = entryName(file);
|
||||
if (accept(name, file)) {
|
||||
throw exc;
|
||||
}
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
|
||||
private String entryName(Path fileOrDir) {
|
||||
String relativeName = Compressor.entryName(root.relativize(fileOrDir).toString());
|
||||
return prefix.isEmpty() ? relativeName : prefix + '/' + relativeName;
|
||||
|
||||
Reference in New Issue
Block a user