From a381897d19f69b21bbb072e3559ea13d5953b58a Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 30 Jan 2007 08:26:06 +0000 Subject: also scan symbolic links on MH mailboxes. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1513 ee746299-78ed-0310-b773-934348b2243d --- libsylph/mh.c | 2 +- libsylph/utils.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'libsylph') diff --git a/libsylph/mh.c b/libsylph/mh.c index 12c1c966..b677f9fc 100644 --- a/libsylph/mh.c +++ b/libsylph/mh.c @@ -1520,7 +1520,7 @@ static void mh_scan_tree_recursive(FolderItem *item) #else #if HAVE_DIRENT_D_TYPE d->d_type == DT_DIR || - (d->d_type == DT_UNKNOWN && + ((d->d_type == DT_UNKNOWN || d->d_type == DT_LNK) && #endif g_stat(entry, &s) == 0 && S_ISDIR(s.st_mode) #if HAVE_DIRENT_D_TYPE diff --git a/libsylph/utils.c b/libsylph/utils.c index 5e3ba645..85758fe3 100644 --- a/libsylph/utils.c +++ b/libsylph/utils.c @@ -2425,8 +2425,15 @@ static gint remove_dir_recursive_real(const gchar *dir) g_free(prev_dir); if (g_rmdir(dir) < 0) { - FILE_OP_ERROR(dir, "rmdir"); - return -1; + if (ENOTDIR == errno) { + if (g_unlink(dir) < 0) { + FILE_OP_ERROR(dir, "unlink"); + return -1; + } + } else { + FILE_OP_ERROR(dir, "rmdir"); + return -1; + } } return 0; -- cgit v1.2.3