aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-11-28 17:45:22 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-11-28 17:45:22 +0200
commite0c2776b6ffbd2b1900fde353aceac734edc93d7 (patch)
tree4822baaa19d1d5b0e26eeea0fe88053c70e87a12 /src
parentTypo fix to sysdefs.h. (diff)
downloadxz-e0c2776b6ffbd2b1900fde353aceac734edc93d7.tar.xz
Remove duplicate code in io_open_dest().
Fix a missing _() in the error message too.
Diffstat (limited to '')
-rw-r--r--src/xz/file_io.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/xz/file_io.c b/src/xz/file_io.c
index be5db73d..ca42bed9 100644
--- a/src/xz/file_io.c
+++ b/src/xz/file_io.c
@@ -524,14 +524,7 @@ io_open_dest(file_pair *pair)
// If --force was used, unlink the target file first.
if (opt_force && unlink(pair->dest_name) && errno != ENOENT) {
- message_error("%s: Cannot unlink: %s",
- pair->dest_name, strerror(errno));
- free(pair->dest_name);
- return true;
- }
-
- if (opt_force && unlink(pair->dest_name) && errno != ENOENT) {
- message_error("%s: Cannot unlink: %s",
+ message_error(_("%s: Cannot remove: %s"),
pair->dest_name, strerror(errno));
free(pair->dest_name);
return true;