diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2009-04-10 14:22:16 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2009-04-10 14:22:16 (GMT) |
commit | b26f51b388bff63179091aa9929ed41abd851213 (patch) | |
tree | 2257bda3773cc802af95ef81e0dba5ee2f8cf87c /shell/main.c | |
parent | d21804b94a1e456c77453ed4993105f0979ceaf2 (diff) |
Change process working directory to $HOME so that we don't prevent
2009-04-10 Carlos Garcia Campos <carlosgc@gnome.org>
* 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
Diffstat (limited to 'shell/main.c')
-rw-r--r-- | shell/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/shell/main.c b/shell/main.c index 4d48fb2..22d42af 100644 --- a/shell/main.c +++ b/shell/main.c @@ -22,6 +22,7 @@ #include <stdlib.h> #include <string.h> +#include <glib/gstdio.h> #include <glib/gi18n.h> #include <gtk/gtk.h> @@ -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 (); |