support Android's crippled lsof
This commit is contained in:
parent
a7ef05a988
commit
5737c49804
3 changed files with 28 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue