Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:9345867
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
diff --git a/src/itdb_sqlite.c b/src/itdb_sqlite.c
index 56c2506..4b92370 100644
--- a/src/itdb_sqlite.c
+++ b/src/itdb_sqlite.c
@@ -2256,6 +2256,7 @@ int itdb_sqlite_generate_itdbs(FExport *fexp)
gchar *itlpdir;
gchar *dirname;
gchar *tmpdir = NULL;
+ gchar dirtmp[16];
printf("libitdbprep: %s called with file %s and uuid %s\n", __func__,
fexp->itdb->filename, itdb_device_get_uuid(fexp->itdb->device));
@@ -2278,7 +2279,9 @@ int itdb_sqlite_generate_itdbs(FExport *fexp)
tzoffset = fexp->itdb->tzoffset;
- tmpdir = g_build_path(g_get_tmp_dir(), tmpnam(NULL), NULL);
+ strcpy(dirtmp, "libgpod.XXXXXX");
+ g_mkstemp(dirtmp);
+ tmpdir = g_build_path(G_DIR_SEPARATOR_S, g_get_tmp_dir(), dirtmp, 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",
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.