summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--Storage/Local.hs4
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index cd79075..01108c3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -10,6 +10,7 @@ keysafe (0.20160832) UNRELEASED; urgency=medium
* Another fix to gpg secret key list parser.
* Warn when uploads fail and are put in the upload queue.
* Warn when --uploadqueued fails to upload to servers.
+ * Fix --uploadqueued bug that prevented deletion of local queued file.
-- Joey Hess <id@joeyh.name> Thu, 01 Sep 2016 11:42:27 -0400
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