diff --git a/CHANGELOG.md b/CHANGELOG.md index 9419d8be..1763cade 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ and this project adheres to - Load notes once for searching tasks and wikis - `(ff agenda | ff search) --without-tag=...` to filter notes without specific tag +### Removed +- Autocreation of `.ff` directory next to `.git`. Let user creates `.ff` + ## [0.13] - 2019-09-10 ### Added - Nix build diff --git a/ff-core/lib/FF.hs b/ff-core/lib/FF.hs index cbec6374..6047c8df 100644 --- a/ff-core/lib/FF.hs +++ b/ff-core/lib/FF.hs @@ -624,16 +624,17 @@ assertNoteIsNative = do getDataDir :: Config -> IO (Maybe FilePath) getDataDir Config {dataDir} = do cur <- getCurrentDirectory - mDataDirFromVcs <- findVcs $ parents cur - pure $ mDataDirFromVcs <|> dataDir + mFFpath <- findFF $ parents cur + pure $ mFFpath <|> dataDir where parents = reverse . scanl1 () . splitDirectories . normalise - findVcs [] = pure Nothing - findVcs (dir : dirs) = do - isDirVcs <- doesDirectoryExist (dir ".git") - if isDirVcs - then pure . Just $ dir ".ff" - else findVcs dirs + findFF [] = pure Nothing + findFF (dir : dirs) = do + let ffDir = dir ".ff" + isFFdir <- doesDirectoryExist ffDir + if isFFdir + then pure $ Just ffDir + else findFF dirs noDataDirectoryMessage :: String noDataDirectoryMessage = diff --git a/ff-gtk/Main.hs b/ff-gtk/Main.hs index 1574527e..d6708841 100644 --- a/ff-gtk/Main.hs +++ b/ff-gtk/Main.hs @@ -140,7 +140,7 @@ initiallyLoadActiveTasks storage = do getDataDirOrFail :: IO FilePath getDataDirOrFail = do cfg <- loadConfig - dataDir <- getDataDir cfg + dataDir <- getDataDir cfg case dataDir of Nothing -> fail noDataDirectoryMessage Just path -> pure path