Skip to content

Commit

Permalink
* PrecalculatedLibraryIndexProvider (getIndexFile): Bug fix. We must
Browse files Browse the repository at this point in the history
  use URI.toFileString() to get a device file name.  Otherwise, file
  path lacks device name or contains wrong path separators.
  • Loading branch information
himi committed Oct 3, 2024
1 parent 3284a93 commit f183f33
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ public boolean isIndexDisabled() {
}

private File getIndexFile(URI uri) {
String pathString = uri.path();
if (pathString == null) return null;
int idx = pathString.lastIndexOf(LIBRARY_FOLDER);
if (idx < 0) return null;
String parentPath = pathString.substring(0, idx + LIBRARY_FOLDER.length());
String fileString = uri.toFileString();
if (fileString == null) return null;
int idx = fileString.lastIndexOf(LIBRARY_FOLDER);
if (idx < 0) return null;
String parentPath = fileString.substring(0, idx + LIBRARY_FOLDER.length());
return new File(parentPath, LibraryIndex.FILE_NAME);
}

Expand Down

0 comments on commit f183f33

Please sign in to comment.