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/utils.c | |
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/utils.c')
-rw-r--r-- | libsylph/utils.c | 11 |
1 files changed, 9 insertions, 2 deletions
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; |