diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-10-06 17:29:45 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-10-06 17:29:45 -0400 |
commit | 8069f11684819fb229cfe9e40c680732776c7c9c (patch) | |
tree | 9445bbe249acc6a9c44425ec7c04557dc9361b75 | |
parent | 4e1f16e4001722603c231dddebc631988fdb8d34 (diff) | |
download | keysafe-8069f11684819fb229cfe9e40c680732776c7c9c.tar.gz |
test writability with a long filename
-rw-r--r-- | Storage/Local.hs | 7 |
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 |