Revert "restrict case-folding to windows"

This reverts commit aad01d904f.
This commit is contained in:
llama 2025-11-19 08:24:12 +08:00
parent aad01d904f
commit 5efa5059d0
No known key found for this signature in database
GPG key ID: 0B7543854B9413C3

View file

@ -21,14 +21,10 @@ pub mod changetracker;
pub struct Checksums(HashMap<String, Sha1Hash>);
impl Checksums {
// case-fold filenames when checking files to be imported
// to account for case-insensitive filesystems
pub fn get(&self, key: impl AsRef<str>) -> Option<&Sha1Hash> {
if cfg!(windows) {
// case-fold filenames when checking files to be imported
// to account for case-insensitive filesystems
self.0.get(key.as_ref().to_lowercase().as_str())
} else {
self.0.get(key.as_ref())
}
self.0.get(key.as_ref().to_lowercase().as_str())
}
pub fn contains_key(&self, key: impl AsRef<str>) -> bool {