diff options
Diffstat (limited to 'Annex')
-rwxr-xr-x[-rw-r--r--] | Annex/Journal.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Annex/Journal.hs b/Annex/Journal.hs index f86d03cf6..9f4d29599 100644..100755 --- a/Annex/Journal.hs +++ b/Annex/Journal.hs @@ -66,14 +66,16 @@ journalDirty = not . null <$> getJournalFiles journalFile :: FilePath -> Git.Repo -> FilePath journalFile file repo = gitAnnexJournalDir repo </> concatMap mangle file where - mangle '/' = "_" - mangle '_' = "__" - mangle c = [c] + mangle c + | c == pathSeparator = "_" + | c == '_' = '__' + | otherwise = c {- Converts a journal file (relative to the journal dir) back to the - filename on the branch. -} fileJournal :: FilePath -> FilePath -fileJournal = replace "//" "_" . replace "_" "/" +fileJournal = replace [pathSeparator, pathSeparator] "_" . + replace "_" [pathSeparator] {- Runs an action that modifies the journal, using locking to avoid - contention with other git-annex processes. -} |