diff options
Diffstat (limited to 'third_party/nix/src/libstore/gc.cc')
-rw-r--r-- | third_party/nix/src/libstore/gc.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/gc.cc b/third_party/nix/src/libstore/gc.cc index 1b2364c25383..262f17df0338 100644 --- a/third_party/nix/src/libstore/gc.cc +++ b/third_party/nix/src/libstore/gc.cc @@ -6,6 +6,7 @@ #include <random> #include <regex> +#include <absl/strings/match.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/statvfs.h> @@ -512,7 +513,7 @@ struct LocalStore::GCState { bool LocalStore::isActiveTempFile(const GCState& state, const Path& path, const std::string& suffix) { - return hasSuffix(path, suffix) && + return absl::EndsWith(path, suffix) && state.tempRoots.find(std::string( path, 0, path.size() - suffix.size())) != state.tempRoots.end(); } |