summaryrefslogtreecommitdiff
path: root/Assistant/Threads/MountWatcher.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-29 14:30:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-29 14:30:10 -0400
commit48cb08ed2237e0630459e4a70341e129426bded9 (patch)
tree6c8e875628cf797963a367aba81232d858a573b8 /Assistant/Threads/MountWatcher.hs
parent0b808465e21d667c0826f454bbe88abff79389b7 (diff)
tweak
Diffstat (limited to 'Assistant/Threads/MountWatcher.hs')
-rw-r--r--Assistant/Threads/MountWatcher.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Assistant/Threads/MountWatcher.hs b/Assistant/Threads/MountWatcher.hs
index cb08071f5..8814f7a86 100644
--- a/Assistant/Threads/MountWatcher.hs
+++ b/Assistant/Threads/MountWatcher.hs
@@ -88,7 +88,7 @@ checkMountMonitor client = do
running <- filter (`elem` usableservices)
<$> liftIO (listServiceNames client)
case running of
- [] -> liftIO $ startOneService client startableservices
+ [] -> startOneService client startableservices
(service:_) -> do
debug [ "Using running DBUS service"
, service
@@ -101,15 +101,15 @@ checkMountMonitor client = do
gvfs = "org.gtk.Private.GduVolumeMonitor"
kde = "org.kde.DeviceNotifications"
-startOneService :: Client -> [ServiceName] -> IO Bool
+startOneService :: Client -> [ServiceName] -> Assistant Bool
startOneService _ [] = return False
startOneService client (x:xs) = do
- _ <- callDBus client "StartServiceByName"
+ _ <- liftIO $ callDBus client "StartServiceByName"
[toVariant x, toVariant (0 :: Word32)]
- ifM (elem x <$> listServiceNames client)
+ ifM (liftIO $ elem x <$> listServiceNames client)
( do
- brokendebug thisThread [ "Started DBUS service"
- , x
+ debug
+ [ "Started DBUS service", x
, "to monitor mount events."
]
return True