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
This commit is contained in:
Florian Müllner 2016-04-13 21:22:56 +02:00
parent ebe071bd50
commit c039a3ddda

View File

@ -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);
}