Created
March 6, 2014 05:14
-
-
Save mattn/9383016 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/itdb_sqlite.c b/src/itdb_sqlite.c | |
index b5b2975..2628c60 100644 | |
--- a/src/itdb_sqlite.c | |
+++ b/src/itdb_sqlite.c | |
@@ -2278,11 +2278,8 @@ int itdb_sqlite_generate_itdbs(FExport *fexp) | |
tzoffset = fexp->itdb->tzoffset; | |
- tmpdir = g_build_path(g_get_tmp_dir(), tmpnam(NULL), NULL); | |
- if (g_mkdir(tmpdir, 0755) != 0) { | |
- g_set_error (&fexp->error, G_FILE_ERROR, g_file_error_from_errno(errno), | |
- "Could not create temporary directory '%s': %s", | |
- tmpdir, strerror(errno)); | |
+ tmpdir = g_dir_make_tmp("libgpod.XXXXXX", &fexp->error); | |
+ if (!tmpdir) { | |
res = -1; | |
goto leave; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment