fix build on windows

This commit is contained in:
Joey Hess 2023-03-03 12:58:39 -04:00
parent 3b0cedf15a
commit 398633c12b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 8 additions and 5 deletions

View file

@ -65,13 +65,10 @@ import Types.ProposedAccepted
import Annex.Action
import Messages.Progress
#ifndef mingw32_HOST_OS
import qualified Utility.RawFilePath as R
#endif
import Control.Concurrent
import qualified Data.Map as M
import qualified Data.ByteString as S
import qualified Utility.RawFilePath as R
import Network.URI
remote :: RemoteType

View file

@ -9,6 +9,7 @@ module Utility.DirWatcher.Win32Notify (watchDir) where
import Common hiding (isDirectory)
import Utility.DirWatcher.Types
import qualified Utility.RawFilePath as R
import System.Win32.Notify
import qualified System.PosixCompat.Files (isRegularFile)
@ -59,7 +60,7 @@ watchDir dir ignored scanevents hooks = do
where
runhook h s = maybe noop (\a -> a f s) (h hooks)
getstatus = catchMaybeIO . getFileStatus
getstatus = catchMaybeIO . R.getFileStatus . fromRawFilePath
{- Check each component of the path to see if it's ignored. -}
ignoredPath :: (FilePath -> Bool) -> FilePath -> Bool

View file

@ -111,3 +111,8 @@ Git Annex is great. I use it several times a week with my multigigabyte backups,
[[!meta author=jkniiv]]
[[!meta title="windows: build fails starting from commit 54ad1b4cf"]]
> Kind of expected there would be something! The patch is almost right,
> but we're avoiding using System.PosixCompat.Files.getFileStatus
> since it doesn't support long paths, so have to use
> Utility.RawFilePath.getFileStatus instead. [[done]] --[[Joey]]