summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Daemon.hs2
-rw-r--r--Utility/DirWatcher/Win32Notify.hs4
-rw-r--r--Utility/InodeCache.hs6
-rw-r--r--Utility/UserInfo.hs4
4 files changed, 10 insertions, 6 deletions
diff --git a/Utility/Daemon.hs b/Utility/Daemon.hs
index 0615149e5..d1f539e98 100644
--- a/Utility/Daemon.hs
+++ b/Utility/Daemon.hs
@@ -21,8 +21,6 @@ import Utility.LockFile
#ifndef mingw32_HOST_OS
import System.Posix
import Control.Concurrent.Async
-#else
-import System.Exit
#endif
#ifndef mingw32_HOST_OS
diff --git a/Utility/DirWatcher/Win32Notify.hs b/Utility/DirWatcher/Win32Notify.hs
index ef4f385c5..54f34935a 100644
--- a/Utility/DirWatcher/Win32Notify.hs
+++ b/Utility/DirWatcher/Win32Notify.hs
@@ -17,10 +17,10 @@ watchDir :: FilePath -> (FilePath -> Bool) -> Bool -> WatchHooks -> IO WatchMana
watchDir dir ignored scanevents hooks = do
scan dir
wm <- initWatchManager
- void $ watchDirectory wm dir True [Create, Delete, Modify, Move] handle
+ void $ watchDirectory wm dir True [Create, Delete, Modify, Move] dispatch
return wm
where
- handle evt
+ dispatch evt
| ignoredPath ignored (filePath evt) = noop
| otherwise = case evt of
(Deleted _ _)
diff --git a/Utility/InodeCache.hs b/Utility/InodeCache.hs
index 328b77595..8a182449b 100644
--- a/Utility/InodeCache.hs
+++ b/Utility/InodeCache.hs
@@ -7,6 +7,7 @@
-}
{-# LANGUAGE CPP #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
module Utility.InodeCache (
InodeCache,
@@ -182,7 +183,10 @@ checkSentinalFile s = do
SentinalStatus (not unchanged) tsdelta
where
#ifdef mingw32_HOST_OS
- unchanged = oldinode == newinode && oldsize == newsize
+ -- Since mtime can appear to change when the time zone is
+ -- changed in windows, we cannot look at the mtime for the
+ -- sentinal file.
+ unchanged = oldinode == newinode && oldsize == newsize && (newmtime == newmtime)
tsdelta = TSDelta $ do
-- Run when generating an InodeCache,
-- to get the current delta.
diff --git a/Utility/UserInfo.hs b/Utility/UserInfo.hs
index 1a557c9a5..c82f04079 100644
--- a/Utility/UserInfo.hs
+++ b/Utility/UserInfo.hs
@@ -13,8 +13,10 @@ module Utility.UserInfo (
myUserGecos,
) where
-import Control.Applicative
import System.PosixCompat
+#ifndef mingw32_HOST_OS
+import Control.Applicative
+#endif
import Utility.Env