From 98636bf2b43fed264a541974a058cb0003e81139 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 14 Sep 2016 14:36:28 -0400 Subject: Fix --uploadqueued bug that prevented deletion of local queued file. --- Storage/Local.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Storage') diff --git a/Storage/Local.hs b/Storage/Local.hs index efda2bc..49ed311 100644 --- a/Storage/Local.hs +++ b/Storage/Local.hs @@ -97,7 +97,7 @@ count section getsharedir = onError (CountFailure . show) $ do move :: Section -> GetShareDir -> Storage -> IO [StoreResult] move section getsharedir storage = do dir <- getsharedir section - fs <- getDirectoryContents dir + fs <- map (dir ) <$> getDirectoryContents dir rs <- forM fs $ \f -> case fromShareFile f of Nothing -> return Nothing Just i -> Just <$> go f i @@ -162,7 +162,7 @@ shareFile i = takeFileName (U8.toString (toByteString i)) <> ext fromShareFile :: FilePath -> Maybe StorableObjectIdent fromShareFile f - | isShareFile f = fromByteString $ U8.fromString $ dropExtension f + | isShareFile f = fromByteString $ U8.fromString $ takeFileName $ dropExtension f | otherwise = Nothing isShareFile :: FilePath -> Bool -- cgit v1.2.3