fix build on windows
authorJoey Hess <joeyh@joeyh.name>
Tue, 17 Nov 2020 15:58:45 +0000 (11:58 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 17 Nov 2020 15:58:45 +0000 (11:58 -0400)
Utility/Daemon.hs

index 2e1a9baa8f7cbfa1e1bb7e7c605f3e36665727a5..683a59263e4e83818acd3466bfb48adf2720b74c 100644 (file)
@@ -176,14 +176,14 @@ stopDaemon pidfile = go =<< checkDaemon pidfile
  - when eg, restarting the daemon.
  -}
 #ifdef mingw32_HOST_OS
-winLockFile :: PID -> FilePath -> IO FilePath
+winLockFile :: PID -> FilePath -> IO RawFilePath
 winLockFile pid pidfile = do
        cleanstale
-       return $ prefix ++ show pid ++ suffix
+       return $ toRawFilePath $ prefix ++ show pid ++ suffix
   where
        prefix = pidfile ++ "."
        suffix = ".lck"
        cleanstale = mapM_ (void . tryIO . removeFile) =<<
-               (filter iswinlockfile <$> dirContents (parentDir pidfile))
+               (filter iswinlockfile <$> dirContents (fromRawFilePath (parentDir (toRawFilePath pidfile))))
        iswinlockfile f = suffix `isSuffixOf` f && prefix `isPrefixOf` f
 #endif