Skip to content

Commit

Permalink
Fix open FileConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
woesss committed Sep 2, 2024
1 parent 2b3eb27 commit 23d4d1e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public class FileSystemFileConnection implements FileConnection {
"e:/",
"0:/",
"1:/",
"a:/",
"b:/",
"fs/MyStuff/"
);
private static final String[] FS_ROOTS = getFileSystemRoots();
Expand Down Expand Up @@ -122,7 +124,7 @@ public class FileSystemFileConnection implements FileConnection {

private String getFsRoot() {
int idx = FC_ROOTS.indexOf(root);
return FS_ROOTS[idx == -1 ? 0 : idx] + DIR_SEP_STR;
return FS_ROOTS[idx == -1 ? 0 : idx % FS_ROOTS.length] + DIR_SEP_STR;
}

private static String getRoot(String path) {
Expand Down

0 comments on commit 23d4d1e

Please sign in to comment.