Skip to content

Commit 4ad8ded

Browse files
committed
Remove the automatic detection of zips.
Split on `!/` only.
1 parent da6c7f6 commit 4ad8ded

2 files changed

Lines changed: 1 addition & 17 deletions

File tree

src/main/java/cpw/mods/niofs/layzip/LayeredZipFileSystemProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class LayeredZipFileSystemProvider extends PathFileSystemProvider
1919
public static final String INDICATOR = "!";
2020
public static final String SEPARATOR = INDICATOR + "/";
2121

22-
public static final String URI_SPLIT_REGEX = "((?<=(\\.zip)(?!(!))/)|(?<=(\\.jar)(?!(!))/)|!/)";
22+
public static final String URI_SPLIT_REGEX = "!/";
2323

2424

2525
@Override

src/test/java/cpw/mods/niofs/layfs/TestLayeredZipFS.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,6 @@ public void testUriParsingAndAccess() throws URISyntaxException, IOException
3131
assertIterableEquals(sourceLines, lines);
3232
}
3333

34-
@Test
35-
public void testWithSplitterUriParsingAndAccess() throws URISyntaxException, IOException
36-
{
37-
38-
final URI filePathUri = new URI(
39-
"jij:src/test/resources/dir_in_dir_in_dir.zip/dir_in_dir.zip/dir1.zip/"
40-
);
41-
final FileSystem zipFS = FileSystems.newFileSystem(filePathUri, new HashMap<>());
42-
43-
final Path pathInText = zipFS.getPath("masktest.txt");
44-
final List<String> lines = Files.readAllLines(pathInText);
45-
final List<String> sourceLines = List.of("dir1");
46-
47-
assertIterableEquals(sourceLines, lines);
48-
}
49-
5034
@Test
5135
public void testUriConversion() throws URISyntaxException, IOException {
5236
final URI filePathUri = new URI(

0 commit comments

Comments
 (0)