GNOME Bugzilla – Bug 736231
save-file plugin doesn't gratefully handle unset XDG_VIDEOS_DIR
Last modified: 2014-09-07 15:26:46 UTC
When running totem this warning can be seen: (totem:14134): GLib-GIO-CRITICAL **: g_file_new_for_path: assertion 'path != NULL' failed It seems to be caused by XDG_VIDEOS_DIR being unset on my system and the "save-file" totem plugin not handling the g_get_user_special_dir call returning NULL properly in two places. totem-3.13.92$ grep -A 2 g_get_user_special_dir src/plugins/save-file/* src/plugins/save-file/totem-save-file.c: dest_path = g_build_filename (g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS), filename, NULL); src/plugins/save-file/totem-save-file.c- dest_uri = g_filename_to_uri (dest_path, NULL, NULL); src/plugins/save-file/totem-save-file.c- g_free (dest_path); -- src/plugins/save-file/totem-save-file.c: videos_dir = g_file_new_for_path (g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS)); src/plugins/save-file/totem-save-file.c- if (file_has_ancestor (file, videos_dir)) { src/plugins/save-file/totem-save-file.c- g_debug ("Not enabling offline save, as '%s' already in ~/Videos", mrl); (Also notice the hard-coded path in the debug output could be changed to use %s and videos_dir to say the correct directory.)