aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Core.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@galois.com>2007-11-19 04:00:57 +0100
committerDon Stewart <dons@galois.com>2007-11-19 04:00:57 +0100
commitaf96e7c706f11640852dd0c1be5c3e37ff4c1ff0 (patch)
tree8ec7230efb72867aca79dd446e17bee0f40787f2 /XMonad/Core.hs
parent3c0c0530ba5a5d9459e4242e850e3f90d5aa597e (diff)
downloadxmonad-af96e7c706f11640852dd0c1be5c3e37ff4c1ff0.tar.gz
xmonad-af96e7c706f11640852dd0c1be5c3e37ff4c1ff0.tar.xz
xmonad-af96e7c706f11640852dd0c1be5c3e37ff4c1ff0.zip
handle case of xmonad binary not existing, when checking recompilation
darcs-hash:20071119030057-cba2c-c21e607cb7d9440b9f07d0eea74513c11ebf3bfc.gz
Diffstat (limited to 'XMonad/Core.hs')
-rw-r--r--XMonad/Core.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/XMonad/Core.hs b/XMonad/Core.hs
index 80006b8..d533bf6 100644
--- a/XMonad/Core.hs
+++ b/XMonad/Core.hs
@@ -312,8 +312,8 @@ recompile = do
yes <- doesFileExist src
when yes $ do
srcT <- getModificationTime src
- binT <- getModificationTime bin
- when (srcT > binT) $ do
+ binT <- catch (getModificationTime bin) (const $ return srcT) -- needs recompiling
+ when (srcT >= binT) $ do
status <- bracket (openFile err WriteMode) hClose $ \h -> do
waitForProcess =<< runProcess "ghc" ["--make", "xmonad.hs", "-i", "-v0"] (Just dir)
Nothing Nothing Nothing (Just h)