summaryrefslogtreecommitdiff
path: root/Assistant/Threads/MountWatcher.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-05 15:08:58 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-05 15:10:26 -0400
commitac71ab7bd7dded89202fde4a1f725dac32c7cd3c (patch)
tree4c4a02715ea00eaf015597593d837858ce077a4b /Assistant/Threads/MountWatcher.hs
parent0833eb43a6ab3cd74c8c9fc77d235fd5644ac555 (diff)
avoid head
Diffstat (limited to 'Assistant/Threads/MountWatcher.hs')
-rw-r--r--Assistant/Threads/MountWatcher.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Assistant/Threads/MountWatcher.hs b/Assistant/Threads/MountWatcher.hs
index 51c7590ea..2cde0f183 100644
--- a/Assistant/Threads/MountWatcher.hs
+++ b/Assistant/Threads/MountWatcher.hs
@@ -98,11 +98,11 @@ checkMountMonitor :: Client -> IO Bool
checkMountMonitor client = do
running <- filter (`elem` usableservices)
<$> listServiceNames client
- if null running
- then startOneService client startableservices
- else do
+ case running of
+ [] -> startOneService client startableservices
+ (service:_) -> do
debug thisThread [ "Using running DBUS service"
- , Prelude.head running
+ , service
, "to monitor mount events."
]
return True