Permalink
Browse files

Use best effort to find a session if file none is specified.

  • Loading branch information...
nominolo committed May 10, 2011
1 parent c5c7883 commit 8ad17927e0687aea1174e094ddd619698d249dfb
Showing with 8 additions and 0 deletions.
  1. +8 −0 src-execs/Server.hs
View
@@ -331,6 +331,14 @@ handleRequest (FileModified file) (Just sid) = do
fileModified sid (T.unpack file)
let fileInModuleGraph = True -- FIXME: find out
RFileModifiedResult fileInModuleGraph <$> sessionNotes sid
+handleRequest (FileModified file0) Nothing = do
+ let file = T.unpack file0
+ ss <- fileSessions file
+ case ss of
+ [] -> scionError "File not part of any session"
+ sid:_ -> do
+ fileModified sid file
+ RFileModifiedResult True <$> sessionNotes sid
handleRequest QuitServer _ =
error "handleRequest: should not have reached this point"

0 comments on commit 8ad1792

Please sign in to comment.