diff options
author | portix <portix@gmx.net> | 2011-09-26 16:05:16 +0200 |
---|---|---|
committer | portix <portix@gmx.net> | 2011-09-26 16:05:16 +0200 |
commit | 3dc92c3d4e81f64a64cfb965e30fc6fa8479143a (patch) | |
tree | d3fd2ed5310aa7b35933a64ff152ab980a0c35ba /src/util.c | |
parent | ccbb7506dca368b9ede7cd5d26acd9c9ed9d3022 (diff) | |
download | dwb-3dc92c3d4e81f64a64cfb965e30fc6fa8479143a.zip |
Check if editor is set, prefix for temp-cache-files
--HG--
branch : develop
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -21,11 +21,11 @@ /* util_string_replace(const char *haystack, const char *needle, const char *replace) return: char * (alloc){{{*/ char * -util_get_temp_filename(void) { +util_get_temp_filename(const char *prefix) { struct timeval t; gettimeofday(&t, NULL); const char *path = g_get_user_cache_dir(); - char *filename = g_strdup_printf("edit%lu", t.tv_usec + t.tv_sec*1000000); + char *filename = g_strdup_printf("%s%lu", prefix, t.tv_usec + t.tv_sec*1000000); char *cache_path = g_build_filename(path, dwb.misc.name, filename, NULL); g_free(filename); |