From: Carlos Garcia Campos Date: Fri, 10 Apr 2009 14:22:16 +0000 (+0000) Subject: Change process working directory to $HOME so that we don't prevent X-Git-Tag: EVINCE_2_27_1~74 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=b26f51b388bff63179091aa9929ed41abd851213;p=evince.git Change process working directory to $HOME so that we don't prevent 2009-04-10 Carlos Garcia Campos * shell/main.c: (main): Change process working directory to $HOME so that we don't prevent unmounting in case the initial cwd is on an external device. Fixes bug #575436. svn path=/trunk/; revision=3598 --- diff --git a/ChangeLog b/ChangeLog index 0e4153bf..11dd6584 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-04-10 Carlos Garcia Campos + + * shell/main.c: (main): + + Change process working directory to $HOME so that we don't prevent + unmounting in case the initial cwd is on an external device. Fixes + bug #575436. + 2009-04-10 Carlos Garcia Campos * shell/ev-window.c: (ev_window_create_tmp_symlink): diff --git a/shell/main.c b/shell/main.c index 4d48fb20..22d42afc 100644 --- a/shell/main.c +++ b/shell/main.c @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -409,7 +410,7 @@ main (int argc, char *argv[]) } } #endif /* ENABLE_DBUS */ - + if (!ev_init ()) return 1; @@ -427,6 +428,11 @@ main (int argc, char *argv[]) load_files (file_arguments, args); g_hash_table_destroy (args); + /* Change directory so we don't prevent unmounting in case the initial cwd + * is on an external device (see bug #575436) + */ + g_chdir (g_get_home_dir ()); + gtk_main (); ev_shutdown ();