diff options
author | Thierry Vignaud <tv@mandriva.org> | 2010-02-02 08:44:13 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2010-02-02 08:44:13 +0000 |
commit | 2a786ea9e9cbb8503a281dbd8c52b545fb4bb54e (patch) | |
tree | d3f4bee405812f593a16860a8df9d2eecd455321 | |
parent | e44a82aee646b6a7e43a0aa4b3c04e917850ec81 (diff) | |
download | userdrake-2a786ea9e9cbb8503a281dbd8c52b545fb4bb54e.tar userdrake-2a786ea9e9cbb8503a281dbd8c52b545fb4bb54e.tar.gz userdrake-2a786ea9e9cbb8503a281dbd8c52b545fb4bb54e.tar.bz2 userdrake-2a786ea9e9cbb8503a281dbd8c52b545fb4bb54e.tar.xz userdrake-2a786ea9e9cbb8503a281dbd8c52b545fb4bb54e.zip |
(Edit) do not crash when trying to rename a user to an already existing name
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | userdrake | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,4 @@ +- do not crash when trying to rename a user to an already existing name - make libuser binding i18n aware - refactorization for readability (please test) - use libuser translations @@ -1154,7 +1154,11 @@ sub Edit() { Gtk2::Button->new($_->[0]), clicked => sub { if (!$retv) { if ($p <= 0) { - UserEdit_valid($userEnt, $model, $primgid); + eval { UserEdit_valid($userEnt, $model, $primgid) }; + if (my $err = $@) { + c::set_tagged_utf8($err); + RaiseError(N("An error occurred:") . "\n" . $err); + } } elsif ($p == 1) { GroupEdit_valid($groupEnt, $model, $groupname); } |