aboutsummaryrefslogtreecommitdiffstats
path: root/USER/USER.xs
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-07-15 11:14:00 +0000
committerOlivier Blin <oblin@mandriva.org>2004-07-15 11:14:00 +0000
commit831eea803ed357a55ac8d47bda50ac3e88057224 (patch)
tree364b95eea8126124adad690a507918b36330c2d3 /USER/USER.xs
parent530b20aab0656bb337633427a9cfe6ad96257c4c (diff)
downloaduserdrake-831eea803ed357a55ac8d47bda50ac3e88057224.tar
userdrake-831eea803ed357a55ac8d47bda50ac3e88057224.tar.gz
userdrake-831eea803ed357a55ac8d47bda50ac3e88057224.tar.bz2
userdrake-831eea803ed357a55ac8d47bda50ac3e88057224.tar.xz
userdrake-831eea803ed357a55ac8d47bda50ac3e88057224.zip
do not die when removing a non existent directory, just warn (#10241)
Diffstat (limited to 'USER/USER.xs')
-rw-r--r--USER/USER.xs7
1 files changed, 5 insertions, 2 deletions
diff --git a/USER/USER.xs b/USER/USER.xs
index 8e4eef5..6c34b65 100644
--- a/USER/USER.xs
+++ b/USER/USER.xs
@@ -199,7 +199,7 @@ lu_homedir_remove(const char *directory, struct lu_error ** error)
/* Open the directory. This catches the case that it's already gone. */
dir = opendir(directory);
if (dir == NULL) {
- lu_error_new(error, lu_error_generic,
+ lu_error_new(error, lu_error_stat,
_("Error removing `%s': %s"), directory,
strerror(errno));
return 0;
@@ -864,7 +864,10 @@ Admin_CleanHome(self, ent)
value = g_value_array_get_nth(values, 0);
tmp = g_value_get_string(value);
if (lu_homedir_remove(tmp, &error) == FALSE) {
- croak("Home Directory Could Not be deleted: %s.\n", error ? error->string : "Unknown error");
+ if (error->code == lu_error_stat)
+ warn("Home Directory Could Not be deleted: %s.\n", error ? error->string : "Unknown error");
+ else
+ croak("Home Directory Could Not be deleted: %s.\n", error ? error->string : "Unknown error");
}
}