[gmime/gmime-2-4] Fixed for ENABLE_MBOX_MATCH
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime/gmime-2-4] Fixed for ENABLE_MBOX_MATCH
- Date: Wed, 24 Oct 2012 03:32:57 +0000 (UTC)
commit 4efec5dd355d41b840975db7f53da206b1aafcfc
Author: Jeffrey Stedfast <fejj gnome org>
Date: Mon Feb 20 17:16:47 2012 -0500
Fixed for ENABLE_MBOX_MATCH
tests/test-mbox.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/tests/test-mbox.c b/tests/test-mbox.c
index f72baa7..9c56c90 100644
--- a/tests/test-mbox.c
+++ b/tests/test-mbox.c
@@ -245,7 +245,7 @@ int main (int argc, char **argv)
DIR *dir;
#ifdef ENABLE_MBOX_MATCH
- if (g_mkdir ("./tmp", 0755) == -1 && errno != EEXIST)
+ if (mkdir ("./tmp", 0755) == -1 && errno != EEXIST)
return 0;
#endif
@@ -437,7 +437,19 @@ int main (int argc, char **argv)
exit:
#ifdef ENABLE_MBOX_MATCH
- g_rmdir ("./tmp");
+ if ((dir = g_dir_open ("./tmp", 0, NULL))) {
+ p = g_stpcpy (input, "./tmp");
+ *p++ = G_DIR_SEPARATOR;
+
+ while ((dent = g_dir_read_name (dir))) {
+ strcpy (p, dent);
+ unlink (input);
+ }
+
+ g_dir_close (dir);
+ }
+
+ rmdir ("./tmp");
#endif
testsuite_end ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]