Skip to content

Commit 8a93973

Browse files
committed
fixed assert in VirtualFileSystem
1 parent 4a276bd commit 8a93973

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

graalpython/org.graalvm.python.embedding/src/org/graalvm/python/embedding/utils/VirtualFileSystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ private Path getExtractedPath(Path path) {
538538
if (entry instanceof FileEntry fileEntry) {
539539
// first create parent dirs
540540
Path parent = xPath.getParent();
541-
assert parent == null || Files.isDirectory(parent);
541+
assert parent == null || !Files.exists(parent) || Files.isDirectory(parent);
542542
if (parent == null) {
543543
throw new NullPointerException("Parent is null during extracting path.");
544544
}

graalpython/org.graalvm.python.embedding/src/org/graalvm/python/embedding/vfs/VirtualFileSystem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ private Path getExtractedPath(Path path) {
534534
if (entry instanceof FileEntry fileEntry) {
535535
// first create parent dirs
536536
Path parent = xPath.getParent();
537-
assert parent == null || Files.isDirectory(parent);
537+
assert parent == null || !Files.exists(parent) || Files.isDirectory(parent);
538538
if (parent == null) {
539539
throw new NullPointerException("Parent is null during extracting path.");
540540
}

0 commit comments

Comments
 (0)