This commit is contained in:
Joey Hess 2020-07-10 14:17:35 -04:00
parent 4c9ad1de46
commit 7a42a47902
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
17 changed files with 31 additions and 34 deletions

View file

@ -84,7 +84,7 @@ keyOpt s = case parseURI s of
Nothing -> giveup $ "bad key/url " ++ s
perform :: Key -> FilePath -> CommandPerform
perform key file = lookupFileNotHidden (toRawFilePath file) >>= \case
perform key file = lookupKeyNotHidden (toRawFilePath file) >>= \case
Nothing -> ifM (liftIO $ doesFileExist file)
( hasothercontent
, do

View file

@ -168,7 +168,7 @@ parseJSONInput i = case eitherDecode (BU.fromString i) of
startBatch :: (Either RawFilePath Key, MetaData) -> CommandStart
startBatch (i, (MetaData m)) = case i of
Left f -> do
mk <- lookupFile f
mk <- lookupKey f
case mk of
Just k -> go k (mkActionItem (k, AssociatedFile (Just f)))
Nothing -> giveup $ "not an annexed file: " ++ fromRawFilePath f

View file

@ -136,7 +136,7 @@ send ups fs = do
let addlist f o = whenM (matcher $ MatchingFile $ FileInfo f f) $
liftIO $ hPutStrLn h o
forM_ fs' $ \f -> do
mk <- lookupFile f
mk <- lookupKey f
case mk of
Nothing -> noop
Just k -> withObjectLoc k $

View file

@ -439,7 +439,7 @@ randKey sz = withTmpFile "randkey" $ \f h -> do
return k
getReadonlyKey :: Remote -> FilePath -> Annex Key
getReadonlyKey r f = lookupFile (toRawFilePath f) >>= \case
getReadonlyKey r f = lookupKey (toRawFilePath f) >>= \case
Nothing -> giveup $ f ++ " is not an annexed file"
Just k -> do
unlessM (inAnnex k) $

View file

@ -215,7 +215,7 @@ withKeysReferenced' mdir initial a = do
Just dir -> inRepo $ LsFiles.inRepo [] [toRawFilePath dir]
go v [] = return v
go v (f:fs) = do
mk <- lookupFile f
mk <- lookupKey f
case mk of
Nothing -> go v fs
Just k -> do