diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-01-30 08:26:06 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-01-30 08:26:06 +0000 |
commit | a381897d19f69b21bbb072e3559ea13d5953b58a (patch) | |
tree | 7eaa1fccd9078275bd47131ea4201a62b17beb42 /libsylph | |
parent | 490f8a3c8523df7b71399d30cf61fd3e503c54da (diff) |
also scan symbolic links on MH mailboxes.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1513 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r-- | libsylph/mh.c | 2 | ||||
-rw-r--r-- | libsylph/utils.c | 11 |
2 files changed, 10 insertions, 3 deletions
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; |