diff options
author | Joey Hess <joey@kitenet.net> | 2013-02-11 17:24:12 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-02-11 17:33:45 -0400 |
commit | fc1f365321bcb9ca4e737c3219393c390c2f85d7 (patch) | |
tree | 92379482d1cdb9dd581c4d4b987521e4ae43aa7e /Assistant/Threads/Committer.hs | |
parent | c4e7c6af35c3abf66b4c0c68d4224ae010e1f2a8 (diff) |
support Android's crippled lsof
Diffstat (limited to 'Assistant/Threads/Committer.hs')
-rw-r--r-- | Assistant/Threads/Committer.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs index d90b0e1cb..ce39735f9 100644 --- a/Assistant/Threads/Committer.hs +++ b/Assistant/Threads/Committer.hs @@ -281,7 +281,10 @@ safeToAdd delayadd pending inprocess = do void $ liftIO $ tryIO $ removeFile $ contentLocation ks canceladd _ = noop - openwrite (_file, mode, _pid) = - mode == Lsof.OpenWriteOnly || mode == Lsof.OpenReadWrite + openwrite (_file, mode, _pid) + | mode == Lsof.OpenWriteOnly = True + | mode == Lsof.OpenReadWrite = True + | mode == Lsof.OpenUnknown = True + | otherwise = False allRight = return . map Right |