diff options
-rw-r--r-- | Command/WebApp.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Command/WebApp.hs b/Command/WebApp.hs index 3730e1419..653363440 100644 --- a/Command/WebApp.hs +++ b/Command/WebApp.hs @@ -30,7 +30,9 @@ seek = [withFlag restartOption $ \restart -> withNothing $ start restart] start :: Bool -> CommandStart start restart = notBareRepo $ do - if restart + f <- liftIO . absPath =<< fromRepo gitAnnexHtmlShim + ok <- liftIO $ doesFileExist f + if restart || not ok then do stopDaemon void $ liftIO . catchMaybeIO . removeFile @@ -40,7 +42,6 @@ start restart = notBareRepo $ do r <- checkpid when (r == Nothing) $ startassistant - f <- liftIO . absPath =<< fromRepo gitAnnexHtmlShim let url = "file://" ++ f ifM (liftIO $ runBrowser url) ( stop |