Skip to content

Commit

Permalink
[FS] Use default local again when comparing filenames case-insensitive
Browse files Browse the repository at this point in the history
The comparison of file-names in case-insensitive file-systems is
non-trivial. This reverts the local to the previous state to use the
default local.
  • Loading branch information
HannesWell committed Aug 13, 2024
1 parent b469dee commit 27ff234
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import java.nio.file.NoSuchFileException;
import java.nio.file.StandardCopyOption;
import java.nio.file.StandardOpenOption;
import java.util.Locale;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileInfo;
import org.eclipse.core.filesystem.IFileStore;
Expand Down Expand Up @@ -248,7 +247,7 @@ public IFileStore getParent() {
@Override
public int hashCode() {
if (LocalFileSystem.MACOSX)
return filePath.toLowerCase(Locale.ENGLISH).hashCode();
return filePath.toLowerCase().hashCode();
return file.hashCode();
}

Expand Down Expand Up @@ -339,7 +338,7 @@ public boolean isParentOf(IFileStore other) {
return false;
}
} else {
if (!thatPath.toLowerCase(Locale.ENGLISH).startsWith(thisPath.toLowerCase(Locale.ENGLISH))) {
if (!thatPath.toLowerCase().startsWith(thisPath.toLowerCase())) {
return false;
}
}
Expand Down

0 comments on commit 27ff234

Please sign in to comment.