[evolution-patches] bugfix for e-mktemp.c



Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/e-util/ChangeLog,v
retrieving revision 1.398.2.4
diff -u -r1.398.2.4 ChangeLog
--- ChangeLog   20 Aug 2003 17:25:23 -0000      1.398.2.4
+++ ChangeLog   28 Aug 2003 17:11:22 -0000
@@ -1,3 +1,8 @@
+2003-08-28  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
Index: e-mktemp.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-mktemp.c,v
retrieving revision 1.7
diff -u -r1.7 e-mktemp.c
--- e-mktemp.c  2 Jan 2003 21:32:14 -0000       1.7
+++ e-mktemp.c  28 Aug 2003 17:11:22 -0000
@@ -131,12 +131,14 @@
                        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);
                        }

-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com  - www.ximian.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]