summaryrefslogtreecommitdiffhomepage
path: root/Storage
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-09-14 14:36:28 -0400
committerJoey Hess <joeyh@joeyh.name>2016-09-14 14:36:28 -0400
commit98636bf2b43fed264a541974a058cb0003e81139 (patch)
treeedaec5e270318aff1f0cca373261ab27200e1b5e /Storage
parentf8231ade9124faa3e7b517d2a7e76085ac84b562 (diff)
downloadkeysafe-98636bf2b43fed264a541974a058cb0003e81139.tar.gz
Fix --uploadqueued bug that prevented deletion of local queued file.
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