aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-mktemp.c14
2 files changed, 13 insertions, 6 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 7cea6d5a32..a9683aa4f3 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-27 Jeffrey Stedfast <fejj@ximian.com>
+
+ * e-mktemp.c (e_mktemp_cleanup): We need to unlink the full paths
+ in the tmpdirs, not just the base path.
+
2003-08-20 Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>
* e-time-utils.c (parse_with_strptime): Fixes #43558 Appointment
diff --git a/e-util/e-mktemp.c b/e-util/e-mktemp.c
index baeb9d2577..10ac4e1bf6 100644
--- a/e-util/e-mktemp.c
+++ b/e-util/e-mktemp.c
@@ -131,12 +131,14 @@ e_mktemp_cleanup (void)
dir = opendir (node->data);
if (dir) {
while ((dent = readdir (dir)) != NULL) {
- /* yea...so if we contain
- subdirectories this won't work, but
- it shouldn't so we won't
- bother caring... */
- if (strcmp (dent->d_name, ".") && strcmp (dent->d_name, ".."))
- unlink (dent->d_name);
+ char *full_path;
+
+ if (!strcmp (dent->d_name, ".") || !strcmp (dent->d_name, ".."))
+ continue;
+
+ full_path = g_strdup_printf ("%s/%s", node->data, dent->d_name);
+ unlink (full_path);
+ g_free (full_path);
}
closedir (dir);
}