[tbo] Added freedesktop standard directory for user data
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tbo] Added freedesktop standard directory for user data
- Date: Wed, 1 Jun 2011 18:24:17 +0000 (UTC)
commit 0a9dccbee03e41f54fba731326c3e8f9dff49090
Author: danigm <danigm wadobo com>
Date: Wed Jun 1 20:22:11 2011 +0200
Added freedesktop standard directory for user data
src/tbo-files.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/tbo-files.c b/src/tbo-files.c
index 60b6fb7..32b3c2e 100644
--- a/src/tbo-files.c
+++ b/src/tbo-files.c
@@ -27,13 +27,15 @@
char **tbo_files_get_dirs ()
{
// Possible doodle dirs
- char **possible_dirs = malloc (3*sizeof(char*));
+ char **possible_dirs = malloc (4*sizeof(char*));
possible_dirs[0] = malloc (255*sizeof(char*));
possible_dirs[1] = malloc (255*sizeof(char*));
- possible_dirs[2] = NULL;
+ possible_dirs[2] = malloc (255*sizeof(char*));
+ possible_dirs[3] = NULL;
strcat (strcpy (possible_dirs[0], getenv("HOME")), "/.tbo/doodle");
- strcpy (possible_dirs[1], DATA_DIR "/doodle");
+ strcat (strcpy (possible_dirs[1], g_get_user_data_dir ()), "/tbo/doodle");
+ strcpy (possible_dirs[2], DATA_DIR "/doodle");
return possible_dirs;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]