summaryrefslogtreecommitdiffhomepage
path: root/Storage
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-10-06 17:29:45 -0400
committerJoey Hess <joeyh@joeyh.name>2016-10-06 17:29:45 -0400
commit8069f11684819fb229cfe9e40c680732776c7c9c (patch)
tree9445bbe249acc6a9c44425ec7c04557dc9361b75 /Storage
parent4e1f16e4001722603c231dddebc631988fdb8d34 (diff)
downloadkeysafe-8069f11684819fb229cfe9e40c680732776c7c9c.tar.gz
test writability with a long filename
Diffstat (limited to 'Storage')
-rw-r--r--Storage/Local.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Storage/Local.hs b/Storage/Local.hs
index cac12b3..637a31b 100644
--- a/Storage/Local.hs
+++ b/Storage/Local.hs
@@ -55,8 +55,11 @@ localStorageOverride :: FilePath -> IO (Maybe Storage)
localStorageOverride d = onError' accesserror $ do
-- Check that the directory can be written to.
createDirectoryIfMissing True d
- writeFile (d </> "test.keysafe") "test"
- removeFile (d </> "test.keysafe")
+ -- Use a filename as long as used for keysafe share files.
+ let f = d </> "testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttest.keysafe"
+ writeFile f "test"
+ _ <- readFile f
+ removeFile f
return $ Just $ localStorage LocallyPreferred (\_ -> pure d) ""
where
accesserror e = do