We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba52164 commit 9ba954cCopy full SHA for 9ba954c
spring-core/src/test/java/org/springframework/util/FileSystemUtilsTests.java
@@ -84,7 +84,11 @@ void copyRecursively(@TempDir File tempDir) throws Exception {
84
assertThat(new File(dest, "child")).exists();
85
assertThat(new File(dest, "child/bar.txt")).exists();
86
87
- URI uri = URI.create("jar:file:/" + dest.toString().replace('\\', '/') + "/archive.zip");
+ String destPath = dest.toString().replace('\\', '/');
88
+ if (!destPath.startsWith("/")) {
89
+ destPath = "/" + destPath;
90
+ }
91
+ URI uri = URI.create("jar:file:" + destPath + "/archive.zip");
92
Map<String, String> env = Map.of("create", "true");
93
FileSystem zipfs = FileSystems.newFileSystem(uri, env);
94
Path ziproot = zipfs.getPath("/");
0 commit comments