From fc1f365321bcb9ca4e737c3219393c390c2f85d7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 11 Feb 2013 17:24:12 -0400 Subject: support Android's crippled lsof --- Assistant/Threads/Committer.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Assistant/Threads/Committer.hs') 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 -- cgit v1.2.3