diff options
author | Ted Gould <ted@gould.cx> | 2010-03-24 20:51:43 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-03-24 20:51:43 -0500 |
commit | b840c918e0a355eabcfff49efc2f4c61803b5c52 (patch) | |
tree | 40498ddc20fd0b3e759bd969d7b36087f2c1aa66 /src | |
parent | 310a9a4b859ffa85e79f054523e6fd479d87a7c4 (diff) | |
download | ayatana-indicator-messages-b840c918e0a355eabcfff49efc2f4c61803b5c52.tar.gz ayatana-indicator-messages-b840c918e0a355eabcfff49efc2f4c61803b5c52.tar.bz2 ayatana-indicator-messages-b840c918e0a355eabcfff49efc2f4c61803b5c52.zip |
Building a file name and checking if it exists.
Diffstat (limited to 'src')
-rw-r--r-- | src/seen-db.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/seen-db.c b/src/seen-db.c index cf2293c..027100d 100644 --- a/src/seen-db.c +++ b/src/seen-db.c @@ -1,6 +1,7 @@ #include "seen-db.h" GHashTable * seendb = NULL; +gchar * filename = NULL; void seen_db_init(void) @@ -10,6 +11,18 @@ seen_db_init(void) } seendb = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); + + /* Build the filename for the seen database. We're putting + it in the cache directory because it could get deleted and + it really wouldn't be a big deal. */ + if (filename == NULL) { + filename = g_build_filename(g_get_user_cache_dir(), "indicators", "messages", "seen-db.keyfile", NULL); + } + + if (g_file_test(filename, G_FILE_TEST_EXISTS)) { + + } + return; } |