Commit d72f96fb authored by ThorbenQuast's avatar ThorbenQuast
Browse files

filewatch: before starting a new watch, call "unwatch" with same parameter set...

filewatch: before starting a new watch, call "unwatch" with same parameter set (reduces the occurrences in which file removal/renaming of opened files is not detected)
parent f40b7ff1
......@@ -361,7 +361,7 @@ var CodeEditor = Emitter.extend({
this.savingProcessing = true;
this.view.POST(vispa.url.dynamic("/ajax/fs/save_file"), {
path: path ? path : this.path,
path: path !== undefined ? path : this.path,
content: this.getContent(),
utf8: true,
watch_id: "code"
......
......@@ -568,6 +568,9 @@ class FileSystem(object):
if not self.checkPermissions(path, os.R_OK):
return "Reading the file is not allowed"
#first: remove the old watch
self.unwatch(window_id, view_id, watch_id)
self.watchservice.subscribe(
(window_id,
view_id,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment