Author: post
Date: 2010-03-28 18:41:36 +0200 (Sun, 28 Mar 2010)
New Revision: 3274
Modified:
trunk/src/gtk-interface.c
Log:
While opening previous directory on startup, temporarily set the directory to
the user home directory. This was, if the initial directory somehow make RS
crash, RS will not crash on next startup.
Modified: trunk/src/gtk-interface.c
===================================================================
--- trunk/src/gtk-interface.c 2010-03-28 16:36:33 UTC (rev 3273)
+++ trunk/src/gtk-interface.c 2010-03-28 16:41:36 UTC (rev 3274)
@@ -1192,7 +1192,11 @@
gui_set_busy(TRUE);
GTK_CATCHUP();
gui_status_push(_("Opening directory..."));
-
+
+ /* Set this, so directory is reset, if a crash occurs during
load, */
+ /* directory will be reset on next startup */
+ rs_conf_set_string(CONF_LWD, g_get_home_dir());
+
if (rs_store_load_directory(rs->store, lwd))
{
gint last_priority_page = 0;
@@ -1212,6 +1216,8 @@
gui_set_busy(FALSE);
gui_status_push(_("Ready"));
rs_dir_selector_expand_path(RS_DIR_SELECTOR(dir_selector), lwd);
+ /* Restore directory */
+ rs_conf_set_string(CONF_LWD, lwd);
g_free(lwd);
}
/* Construct this to load dcp profiles early */
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit