summaryrefslogtreecommitdiffhomepage
path: root/Storage
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-12 05:00:17 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-12 05:00:17 -0400
commit0045c4b162d2a68a85b8e7844dca97834f888dd5 (patch)
tree12cff1c993008797edf261aa18d529bc1fb32954 /Storage
parentf74151ead49895f86257c9abfbe90c027d91d456 (diff)
downloadkeysafe-0045c4b162d2a68a85b8e7844dca97834f888dd5.tar.gz
separate error code for already exsisting object store
Diffstat (limited to 'Storage')
-rw-r--r--Storage/LocalFiles.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Storage/LocalFiles.hs b/Storage/LocalFiles.hs
index f34a8b5..ebcc492 100644
--- a/Storage/LocalFiles.hs
+++ b/Storage/LocalFiles.hs
@@ -38,7 +38,7 @@ store i s = onError (StoreFailure . show) $ do
let dest = dir </> shardFile i
exists <- doesFileExist dest
if exists
- then return $ StoreFailure "file already exists"
+ then return StoreAlreadyExists
else do
let tmp = dest ++ ".tmp"
fd <- openFd tmp WriteOnly (Just 0o666)