mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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
1 changed files with 2 additions and 1 deletions
|
|
@ -125,7 +125,8 @@ const BackgroundCache = new Lang.Class({
|
|||
removeImageContent: function(content) {
|
||||
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];
|
||||
|
||||
this._removeContent(this._images, content);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue