commit: 84bb4a80e03bd2f554762926e1d167a92c17296a
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sat Sep 13 01:21:07 2025 +0000
Commit: Kerin Millar <kfm <AT> plushkava <DOT> net>
CommitDate: Sat Sep 13 01:21:07 2025 +0000
URL: https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=84bb4a80
Don't directly unlink $interim_path if renaming fails
There is no need to explicitly unlink $interim_path because its removal
is now guaranteed by the END block.
See-also: 30b519f15fce4f78de28ccd49b829c327072f4a6
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
locale-gen | 4 ----
1 file changed, 4 deletions(-)
diff --git a/locale-gen b/locale-gen
index f2a3ac5..760d46b 100755
--- a/locale-gen
+++ b/locale-gen
@@ -537,10 +537,6 @@ sub generate_archive ($prefix, $gentoo_prefix,
$locale_dir, $do_update, @canonic
# Atomically replace the old archive.
if (! rename $interim_path, $final_path) {
- {
- local $!;
- unlink $interim_path;
- }
die "$PROGRAM: Can't rename '$interim_path' to '$final_path':
$!\n";
}