GNOME Bugzilla – Bug 589699
When ~/.cache isn't exists, session data isn't saved.
Last modified: 2009-07-29 19:10:07 UTC
Please describe the problem: When ~/.cache isn't exists, session data isn't saved. Example of this probrem: I adjust the layout and Lock Doc Layout. When exit anjuta and run again, return to the original layout. I'm sorry in strange English.(I am Japanese.) Steps to reproduce: 1. remove ~/.cache (My environment don't have ~/.cache from beginning.) 2. run anjuta on terminal Actual results: Anjuta say follow error. (anjuta:11234): libanjuta-WARNING **: Error directory: Error creating directory: No such file or directory (anjuta:11234): GLib-GIO-CRITICAL **: g_file_query_exists: assertion `G_IS_FILE(file)' failed (anjuta:11234): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed (anjuta:11234): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed (anjuta:11234): libanjuta-CRITICAL **: anjuta_shell_session_save: assertion `session_directory != NULL' failed Expected results: Does this happen every time? Other information:
Created attachment 139398 [details] [review] use g_make_directory_with_parents instead of g_make_directory
Thanks for your patch. But I would like to keep using a GFile for this and the function g_file_make_directory_with_parents. Unfortunately, this is a quite recent function. So could you do the following changes ? Use a define (#if GLIB_CHECK_VERSION(2,17,1)) to check that glib is new enough and use g_file_make_directory_with_parents only in this case ? Then if the glib is too old, writes a small function recursively calling g_file_make_directory to create all parents. I have search g_file_make_directory_with_parents on google source and find two projects doing something like this. Finally, keep the warning message if the creation fails.
Created attachment 139475 [details] [review] make anjuta_util_create_dir recursively. Thanks for your reply. I tried to make patch again. I made anjuta_util_create_dir recursively.
Thanks for your bug report and your patch. I have committed without any change in the development version. It will be available in the next stable release.