aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-01-11 14:14:44 +0100
committerGitHub <noreply@github.com>2022-01-11 14:14:44 +0100
commit8a446aff75880f11db248677a25426f93a0687f3 (patch)
treedbb4435c47807522816483e5bfd37bf888f6df8b /src/libstore/local-store.hh
parentf39d94a55be7db1759e3fcd8aea24bfb0da7b8c2 (diff)
parent9f9f39a24b515d5d3ddd2bbd4cdadb0b1924bc3b (diff)
Merge pull request #5898 from layus/repair-path-links
Make --repair-path also repair corrupt optimised links
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index 115ea046a..c4d7b80bd 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -172,8 +172,9 @@ public:
void optimiseStore() override;
- /* Optimise a single store path. */
- void optimisePath(const Path & path);
+ /* Optimise a single store path. Optionally, test the encountered
+ symlinks for corruption. */
+ void optimisePath(const Path & path, RepairFlag repair);
bool verifyStore(bool checkContents, RepairFlag repair) override;
@@ -253,7 +254,7 @@ private:
InodeHash loadInodeHash();
Strings readDirectoryIgnoringInodes(const Path & path, const InodeHash & inodeHash);
- void optimisePath_(Activity * act, OptimiseStats & stats, const Path & path, InodeHash & inodeHash);
+ void optimisePath_(Activity * act, OptimiseStats & stats, const Path & path, InodeHash & inodeHash, RepairFlag repair);
// Internal versions that are not wrapped in retry_sqlite.
bool isValidPath_(State & state, const StorePath & path);