]> www.fi.muni.cz Git - evince.git/commitdiff
Change process working directory to $HOME so that we don't prevent
authorCarlos Garcia Campos <carlosgc@gnome.org>
Fri, 10 Apr 2009 14:22:16 +0000 (14:22 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Fri, 10 Apr 2009 14:22:16 +0000 (14:22 +0000)
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

ChangeLog
shell/main.c

index 0e4153bf5e0b87eaa4bb074efeb419b8015189e6..11dd6584fb314dafb373f491cc8e5545270fe985 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
+       
 2009-04-10  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-window.c: (ev_window_create_tmp_symlink):
index 4d48fb203c383843aff671369b01f0022e3a13f2..22d42afc5c096f2f25fe59f25fea75b034e00d06 100644 (file)
@@ -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 ();