From c039a3ddda97ee0aff8563f9dc61f9814f95b9dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 13 Apr 2016 21:22:56 +0200 Subject: [PATCH] recorder: Fall back to ~ if XDG_VIDEOS_DIR doesn't exist Unlike screenshots, recordings fail when the default directory doesn't exist. Fall back to home instead. https://bugzilla.gnome.org/show_bug.cgi?id=765015 --- src/shell-recorder.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shell-recorder.c b/src/shell-recorder.c index 62ef0c4cc..84d68f56b 100644 --- a/src/shell-recorder.c +++ b/src/shell-recorder.c @@ -944,6 +944,9 @@ get_absolute_path (char *maybe_relative) else { const char *video_dir = g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS); + if (!g_file_test (video_dir, G_FILE_TEST_EXISTS)) + video_dir = g_get_home_dir (); + path = g_build_filename (video_dir, maybe_relative, NULL); }