diff options
Diffstat (limited to 'USER/USER.xs')
-rw-r--r-- | USER/USER.xs | 7 |
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"); } } |