[nautilus-sendto] main: Create temp directories using g_mkdtemp()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-sendto] main: Create temp directories using g_mkdtemp()
- Date: Tue, 23 Sep 2014 08:34:50 +0000 (UTC)
commit ed05b67f9e2c050906032b5bcc3cb376d5bb1028
Author: Bastien Nocera <hadess hadess net>
Date: Tue Sep 23 10:33:18 2014 +0200
main: Create temp directories using g_mkdtemp()
Rather than creating the temp directory name by hand.
src/nautilus-sendto.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-sendto.c b/src/nautilus-sendto.c
index 2c14b09..c0b6fea 100644
--- a/src/nautilus-sendto.c
+++ b/src/nautilus-sendto.c
@@ -261,10 +261,10 @@ pack_files (GList *file_list)
g_assert (filename != NULL && *filename != '\0');
- tmp_work_dir = g_strdup_printf ("%s/nautilus-sendto-%s/%li",
- g_get_tmp_dir (), g_get_user_name (),
- time (NULL));
- g_mkdir_with_parents (tmp_work_dir, 0700);
+ tmp_work_dir = g_build_filename (g_get_tmp_dir (),
+ "nautilus-sendto-XXXXXX",
+ NULL);
+ tmp_work_dir = g_mkdtemp (tmp_work_dir);
pack_type = g_strdup (".zip");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]