Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ev-file-helpers.c6
-rw-r--r--lib/ev-file-helpers.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/ev-file-helpers.c b/lib/ev-file-helpers.c
index 9763831..044aeae 100644
--- a/lib/ev-file-helpers.c
+++ b/lib/ev-file-helpers.c
@@ -113,7 +113,7 @@ ev_file_helpers_shutdown (void)
}
gchar *
-ev_tmp_filename (void)
+ev_tmp_filename (const gchar *prefix)
{
gchar *basename;
gchar *filename = NULL;
@@ -122,7 +122,9 @@ ev_tmp_filename (void)
if (filename != NULL)
g_free (filename);
- basename = g_strdup_printf ("document-%d", count ++);
+ basename = g_strdup_printf ("%s-%d",
+ prefix ? prefix : "document",
+ count ++);
filename = g_build_filename (ev_tmp_dir (),
basename, NULL);
diff --git a/lib/ev-file-helpers.h b/lib/ev-file-helpers.h
index 69ff83d..4e75a14 100644
--- a/lib/ev-file-helpers.h
+++ b/lib/ev-file-helpers.h
@@ -33,7 +33,7 @@ void ev_file_helpers_init (void);
void ev_file_helpers_shutdown (void);
-gchar* ev_tmp_filename (void);
+gchar* ev_tmp_filename (const char *prefix);
gboolean ev_xfer_uri_simple (const char *from,
const char *to,