diff options
Diffstat (limited to 'CmdLine')
-rw-r--r-- | CmdLine/Seek.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/CmdLine/Seek.hs b/CmdLine/Seek.hs index 238ed4291..9a874807b 100644 --- a/CmdLine/Seek.hs +++ b/CmdLine/Seek.hs @@ -107,9 +107,11 @@ withFilesUnlocked' :: ([FilePath] -> Git.Repo -> IO ([FilePath], IO Bool)) -> (F withFilesUnlocked' typechanged a params = seekActions $ prepFiltered a unlockedfiles where - check f = liftIO (notSymlink f) <&&> - (isJust <$> catKeyFile f <||> isJust <$> catKeyFileHEAD f) - unlockedfiles = filterM check =<< seekHelper typechanged params + unlockedfiles = filterM isUnlocked =<< seekHelper typechanged params + +isUnlocked :: FilePath -> Annex Bool +isUnlocked f = liftIO (notSymlink f) <&&> + (isJust <$> catKeyFile f <||> isJust <$> catKeyFileHEAD f) {- Finds files that may be modified. -} withFilesMaybeModified :: (FilePath -> CommandStart) -> CommandSeek |