From 9bc5a879a9b8f4c581ac244d51f8900eb527d385 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Wed, 24 May 2023 00:37:33 -0600 Subject: [PATCH] util: Ignore paths starting with dot Otherwise `/nix/store/.links` (`nix-store --optimise`) would be matched. --- nix-actions-cache/src/util.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nix-actions-cache/src/util.rs b/nix-actions-cache/src/util.rs index 40c3b5b..127560a 100644 --- a/nix-actions-cache/src/util.rs +++ b/nix-actions-cache/src/util.rs @@ -31,6 +31,11 @@ pub async fn get_store_paths() -> Result> { if s.ends_with("-source") { continue; } + + // Special paths (so far only `.links`) + if s.starts_with(".") { + continue; + } } paths.insert(store_dir.join(file_name));