From 5d2497063f5f1cac24fd7ff56a2c6cb665430397 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 29 Oct 2014 09:29:12 +0800 Subject: [PATCH] . --- file/files.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/file/files.go b/file/files.go index 84eec4d..13efade 100644 --- a/file/files.go +++ b/file/files.go @@ -155,6 +155,7 @@ func SaveFile(w http.ResponseWriter, r *http.Request) { } filePath := args["file"].(string) + sid := args["sid"].(string) fout, err := os.Create(filePath) @@ -173,6 +174,7 @@ func SaveFile(w http.ResponseWriter, r *http.Request) { glog.Error(err) data["succ"] = false + wSession := session.WideSessions.Get(sid) wSession.EventQueue.Queue <- &event.Event{Code: event.EvtCodeServerInternalError, Sid: sid, Data: "can't save file " + filePath} @@ -230,6 +232,9 @@ func RemoveFile(w http.ResponseWriter, r *http.Request) { } path := args["path"].(string) + sid := args["sid"].(string) + + wSession := session.WideSessions.Get(sid) if !removeFile(path) { data["succ"] = false