diff --git a/js/ui/background.js b/js/ui/background.js index 681a5feaa..1c2b83bae 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -154,8 +154,12 @@ var BackgroundCache = new Lang.Class({ let monitor = file.monitor(Gio.FileMonitorFlags.NONE, null); monitor.connect('changed', - Lang.bind(this, function() { - this.emit('file-changed', file); + Lang.bind(this, function(obj, file, otherFile, eventType) { + // Ignore CHANGED and CREATED events, since in both cases + // we'll get a CHANGES_DONE_HINT event when done. + if (eventType != Gio.FileMonitorEvent.CHANGED && + eventType != Gio.FileMonitorEvent.CREATED) + this.emit('file-changed', file); })); this._fileMonitors[key] = monitor;