screenshot: Fix broken GLib.Error.matches call

You have to pass a domain and an error code, not just an error
code.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6540

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2725>
This commit is contained in:
Adam Williamson 2023-03-25 09:19:41 -07:00
parent f097900373
commit a093a721fa

View File

@ -2084,7 +2084,7 @@ function _storeScreenshot(bytes, pixbuf) {
try {
bookmarks.load_from_file(recentFile);
} catch (e) {
if (!e.matches(GLib.BookmarkFileError.FILE_NOT_FOUND)) {
if (!e.matches(GLib.BookmarkFileError, GLib.BookmarkFileError.FILE_NOT_FOUND)) {
log(`Could not open recent file ${uri}: ${e.message}`);
return;
}