diff options
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Add.hs | 5 | ||||
-rw-r--r-- | Command/Status.hs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Command/Add.hs b/Command/Add.hs index 519dad6e4..d745000f8 100644 --- a/Command/Add.hs +++ b/Command/Add.hs @@ -160,8 +160,9 @@ ingest Nothing = return (Nothing, Nothing) ingest (Just source) = withTSDelta $ \delta -> do backend <- chooseBackend $ keyFilename source k <- genKey source backend - ms <- liftIO $ catchMaybeIO $ getFileStatus $ contentLocation source - mcache <- maybe (pure Nothing) (liftIO . toInodeCache delta) ms + let src = contentLocation source + ms <- liftIO $ catchMaybeIO $ getFileStatus src + mcache <- maybe (pure Nothing) (liftIO . toInodeCache delta src) ms case (mcache, inodeCache source) of (_, Nothing) -> go k mcache ms (Just newc, Just c) | compareStrong c newc -> go k mcache ms diff --git a/Command/Status.hs b/Command/Status.hs index 578538ca7..f49684258 100644 --- a/Command/Status.hs +++ b/Command/Status.hs @@ -70,7 +70,7 @@ statusDirect f = checkstatus =<< liftIO (catchMaybeIO $ getFileStatus f) | not (isSymbolicLink s) = checkkey s =<< catKeyFile f | otherwise = Just <$> checkNew f - checkkey s (Just k) = ifM (sameFileStatus k s) + checkkey s (Just k) = ifM (sameFileStatus k f s) ( return Nothing , return $ Just ModifiedFile ) |