summaryrefslogtreecommitdiffhomepage
path: root/Storage
diff options
context:
space:
mode:
Diffstat (limited to 'Storage')
-rw-r--r--Storage/Local.hs4
1 files changed, 2 insertions, 2 deletions
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