Thanks to bug reporter for the patch.
winLocker takelock _ (Just lockfile) = do
modifyContent lockfile $
void $ liftIO $ tryIO $
- writeFile lockfile ""
+ writeFile (fromRawFilePath lockfile) ""
liftIO $ takelock lockfile
-- never reached; windows always uses a separate lock file
winLocker _ _ Nothing = return Nothing
Nothing -> return is_locked
Just lockhandle -> do
dropLock lockhandle
- void $ tryIO $ removeWhenExistsWith removeLink lockfile
+ void $ tryIO $ removeWhenExistsWith removeLink (fromRawFilePath lockfile)
return is_unlocked
, return is_missing
)
createAnnexDirectory (parentDir logfile)
ifM (liftIO $ isNothing <$> getEnv flag)
( liftIO $ withNullHandle $ \nullh -> do
- loghandle <- openLog logfile
+ loghandle <- openLog (fromRawFilePath logfile)
e <- getEnvironment
cmd <- programPath
ps <- getArgs
exitcode <- withCreateProcess p $ \_ _ _ pid ->
waitForProcess pid
exitWith exitcode
- , start (Utility.Daemon.foreground (Just pidfile)) $
+ , start (Utility.Daemon.foreground (Just (fromRawFilePath pidfile))) $
case startbrowser of
Nothing -> Nothing
Just a -> Just $ a Nothing Nothing
* Fix hang when an external special remote program exited but
the stderr pipe to it was left open, due to a daemon having inherited
the file descriptor.
+ * Fix build on Windows.
-- Joey Hess <id@joeyh.name> Mon, 16 Nov 2020 09:38:32 -0400
v <- liftIO $ lockShared lck
liftIO $ case v of
Nothing -> catchDefaultIO Nothing $
- readTransferInfoFile Nothing tfile
+ readTransferInfoFile Nothing (fromRawFilePath tfile)
Just lockhandle -> do
dropLock lockhandle
cleanstale
#ifdef mingw32_HOST_OS
{- Windows needs the files inside the directory to be writable
- before it can delete them. -}
- void $ tryIO $ mapM_ allowWrite =<< dirContents dir
+ void $ tryIO $ mapM_ (allowWrite . toRawFilePath) =<< dirContents dir
#endif
tryNonAsync (removeDirectoryRecursive dir) >>= \case
Right () -> return ()
#ifndef mingw32_HOST_OS
=<< getFdStatus fd
#else
- =<< getFileStatus f
+ =<< R.getFileStatus f
#endif
guardSameContentIdentifiers cont cid currcid
pid <- getPID
writeFile pidfile (show pid)
lckfile <- winLockFile pid pidfile
- writeFile lckfile ""
+ writeFile (fromRawFilePath lckfile) ""
void $ lockExclusive lckfile
#endif
my backup files around and it's always nice to have an external checksum (I use MD5E w/Annex) recorded
"in the system" so that you can be sure your files are not altered due to bit rot, etc. In any case,
big thanks go to Joey (et al.) for this wonderful tool you made!
+
+> [[fixed|done]] --[[Joey]]