util: Ignore paths starting with dot

Otherwise `/nix/store/.links` (`nix-store --optimise`) would be matched.
This commit is contained in:
Zhaofeng Li 2023-05-24 00:37:33 -06:00
parent 90320a0cbd
commit 9bc5a879a9

View file

@ -31,6 +31,11 @@ pub async fn get_store_paths() -> Result<HashSet<PathBuf>> {
if s.ends_with("-source") { if s.ends_with("-source") {
continue; continue;
} }
// Special paths (so far only `.links`)
if s.starts_with(".") {
continue;
}
} }
paths.insert(store_dir.join(file_name)); paths.insert(store_dir.join(file_name));