deal with getMounts crashing on android
This commit is contained in:
parent
f22a8c3485
commit
f5df6244f3
2 changed files with 7 additions and 0 deletions
|
@ -13,9 +13,13 @@ module Utility.Mounts (getMounts, Mntent(..)) where
|
|||
import qualified System.MountPoints
|
||||
import System.MountPoints (Mntent(..))
|
||||
|
||||
import Utility.Exception
|
||||
|
||||
getMounts :: IO [Mntent]
|
||||
#ifndef __ANDROID__
|
||||
getMounts = System.MountPoints.getMounts
|
||||
-- That will crash when running on Android, so fall back to this.
|
||||
`catchNonAsync` const System.MountPoints.getProcMounts
|
||||
#else
|
||||
getMounts = System.MountPoints.getProcMounts
|
||||
#endif
|
||||
|
|
|
@ -33,4 +33,7 @@ https://wiki.termux.com/wiki/Termux:Boot (Integration in place now)
|
|||
|
||||
Apparently termux-exec sets a `LD_PRELOAD` that is not compatible, so
|
||||
the wrapper script would need to unset it. (Done now)
|
||||
|
||||
Webapp mountwatcher crashes "getMounts: does not exist" (caught exception
|
||||
now))
|
||||
"""]]
|
||||
|
|
Loading…
Reference in a new issue