Ignore non- .tar.gz files in cache dir

This commit is contained in:
Felix Schütt
2022-11-15 13:09:30 +01:00
parent cf77524829
commit b0cee0e5a3

View File

@@ -1448,6 +1448,7 @@ mod http_fetch {
entries.retain(|p| p.to_str().map(|p| check_vendor(p)).unwrap_or(true));
entries.retain(|p| p.to_str().map(|p| check_os(p)).unwrap_or(true));
entries.retain(|p| p.to_str().map(|p| check_env(p)).unwrap_or(true));
entries.retain(|p| p.to_str().map(|p| p.ends_with(".tar.gz")).unwrap_or(false));
if !entries.is_empty() {
cache_path.push(&entries[0]);
if cache_path.exists() {