Skip to content

@mattn /gist:9383016
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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
Something went wrong with that request. Please try again.