[gnome-shell] Fix userdata directory creation
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Fix userdata directory creation
- Date: Thu, 6 May 2010 11:33:39 +0000 (UTC)
commit b09b30616d2f30a9d495fe0df2ec890971590860
Author: Florian Müllner <fmuellner src gnome org>
Date: Thu May 6 09:42:53 2010 +0200
Fix userdata directory creation
When creating the directory to store user data, XDG_DATA_HOME is
not guaranteed to exist. Also, the standard mandates permissions
of 0700 for the directory.
https://bugzilla.gnome.org/show_bug.cgi?id=617555
src/shell-global.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/src/shell-global.c b/src/shell-global.c
index 7040bf1..d755b26 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -159,7 +159,6 @@ shell_global_init (ShellGlobal *global)
{
const char *datadir = g_getenv ("GNOME_SHELL_DATADIR");
char *imagedir;
- GFile *userdata_dir;
if (!datadir)
datadir = GNOME_SHELL_DATADIR;
@@ -180,9 +179,7 @@ shell_global_init (ShellGlobal *global)
/* Ensure config dir exists for later use */
global->userdatadir = g_build_filename (g_get_user_data_dir (), "gnome-shell", NULL);
- userdata_dir = g_file_new_for_path (global->userdatadir);
- g_file_make_directory (userdata_dir, NULL, NULL);
- g_object_unref (userdata_dir);
+ g_mkdir_with_parents (global->userdatadir, 0700);
global->grab_notifier = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
g_signal_connect (global->grab_notifier, "grab-notify", G_CALLBACK (grab_notify), global);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]