aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-08-28 04:55:46 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-08-28 04:55:46 +0800
commit167ff0651a993e5f4e145cc92de2e86d64783220 (patch)
treef8a41f53b2a85cb028dbdb0cf4c0f03d30689966
parent7dea6c9dc22d7be2f2069bb2372d2df9df2abdd5 (diff)
downloadgsoc2013-evolution-167ff0651a993e5f4e145cc92de2e86d64783220.tar.gz
gsoc2013-evolution-167ff0651a993e5f4e145cc92de2e86d64783220.tar.zst
gsoc2013-evolution-167ff0651a993e5f4e145cc92de2e86d64783220.zip
We need to unlink the full paths in the tmpdirs, not just the base path.
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. svn path=/trunk/; revision=22391
-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);
}