summaryrefslogtreecommitdiff
path: root/src/file-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file-utils.c')
-rw-r--r--src/file-utils.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/file-utils.c b/src/file-utils.c
index 1491790..3b33480 100644
--- a/src/file-utils.c
+++ b/src/file-utils.c
@@ -953,7 +953,7 @@ gboolean
is_temp_work_dir (const char *dir)
{
int i;
- char *folder;
+ char *folder = NULL;
if (strncmp (dir, "file://", 7) == 0)
dir = dir + 7;
@@ -961,16 +961,15 @@ is_temp_work_dir (const char *dir)
return FALSE;
for (i = 0; try_folder[i] != NULL; i++) {
-
folder = ith_temp_folder_to_try (i);
if (strncmp (dir, folder, strlen (folder)) == 0)
if (strncmp (dir + strlen (folder), "/.fr-", 5) == 0) {
g_free (folder);
return TRUE;
}
+ g_free (folder);
}
- g_free (folder);
return FALSE;
}