From 8069f11684819fb229cfe9e40c680732776c7c9c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Oct 2016 17:29:45 -0400 Subject: test writability with a long filename --- Storage/Local.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Storage') 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 -- cgit v1.2.3