background: Don't prematurely remove file monitors
We need to only remove file monitors when there's no other users of the content...
This commit is contained in:
parent
b168ccb605
commit
01f740ce69
@ -125,7 +125,8 @@ const BackgroundCache = new Lang.Class({
|
|||||||
removeImageContent: function(content) {
|
removeImageContent: function(content) {
|
||||||
let filename = content.get_filename();
|
let filename = content.get_filename();
|
||||||
|
|
||||||
if (filename && this._fileMonitors[filename])
|
let hasOtherUsers = this._images.some(function(content) { return filename == content.get_filename(); });
|
||||||
|
if (!hasOtherUsers)
|
||||||
delete this._fileMonitors[filename];
|
delete this._fileMonitors[filename];
|
||||||
|
|
||||||
this._removeContent(this._images, content);
|
this._removeContent(this._images, content);
|
||||||
|
Loading…
Reference in New Issue
Block a user