Co-authored-by: Glavo <zjx001202@gmail.com>
This commit is contained in:
committed by
GitHub
parent
dc993b871f
commit
64821600c5
@@ -129,10 +129,10 @@ public abstract class ArchiveFileTree<R, E extends ArchiveEntry> implements Clos
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (entry.isDirectory()) {
|
if (entry.isDirectory()) {
|
||||||
if (dir.entry != null) {
|
if (dir.entry == null)
|
||||||
throw new IOException("Duplicate entry: " + entry.getName());
|
dir.entry = entry;
|
||||||
}
|
else if (!dir.entry.isDirectory())
|
||||||
dir.entry = entry;
|
throw new IOException("A file and a directory have the same name: " + entry.getName());
|
||||||
} else {
|
} else {
|
||||||
String fileName = path[path.length - 1];
|
String fileName = path[path.length - 1];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user