more OsPath conversion
Finally reached Annex code in this conversion. Sponsored-by: Graham Spencer
This commit is contained in:
parent
51a6cd1ee6
commit
f9d42c37c0
9 changed files with 64 additions and 37 deletions
|
@ -35,7 +35,7 @@ rotateLog logfile = go 0
|
|||
where
|
||||
go num
|
||||
| num > maxLogs = return ()
|
||||
| otherwise = whenM (doesFileExist currfile) $ do
|
||||
| otherwise = whenM (doesFileExist (toOsPath currfile)) $ do
|
||||
go (num + 1)
|
||||
rename (toRawFilePath currfile) (toRawFilePath nextfile)
|
||||
where
|
||||
|
@ -50,7 +50,7 @@ rotatedLog logfile n = logfile ++ "." ++ show n
|
|||
|
||||
{- Lists most recent logs last. -}
|
||||
listLogs :: FilePath -> IO [FilePath]
|
||||
listLogs logfile = filterM doesFileExist $ reverse $
|
||||
listLogs logfile = filterM (doesFileExist . toOsPath) $ reverse $
|
||||
logfile : map (rotatedLog logfile) [1..maxLogs]
|
||||
|
||||
maxLogs :: Int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue