[gnome-shell] Fix for screenshots when pictures path is unavailable
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Fix for screenshots when pictures path is unavailable
- Date: Thu, 11 Feb 2021 18:56:34 +0000 (UTC)
commit f9652aab82fbb3f9ef8cde3dce84f0e35510e250
Author: Brion Vibber <bvibber wikimedia org>
Date: Wed Dec 18 14:34:45 2019 -0800
Fix for screenshots when pictures path is unavailable
On my local jhbuild setup some local stuff is not set up and
there's no pictures folder. This fixes a regression where it
blew up instead of saving to the home dir in this situation.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1658>
js/ui/screenshot.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js
index 8a92c62130..f10c68f386 100644
--- a/js/ui/screenshot.js
+++ b/js/ui/screenshot.js
@@ -84,7 +84,7 @@ var ScreenshotService = class {
let path = [
GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_PICTURES),
GLib.get_home_dir(),
- ].find(p => GLib.file_test(p, GLib.FileTest.EXISTS));
+ ].find(p => p && GLib.file_test(p, GLib.FileTest.EXISTS));
if (!path)
return null;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]