mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
Remove duplicate code in io_open_dest().
Fix a missing _() in the error message too.
This commit is contained in:
parent
f057a33c6f
commit
e0c2776b6f
1 changed files with 1 additions and 8 deletions
|
@ -524,14 +524,7 @@ io_open_dest(file_pair *pair)
|
||||||
|
|
||||||
// If --force was used, unlink the target file first.
|
// If --force was used, unlink the target file first.
|
||||||
if (opt_force && unlink(pair->dest_name) && errno != ENOENT) {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (opt_force && unlink(pair->dest_name) && errno != ENOENT) {
|
|
||||||
message_error("%s: Cannot unlink: %s",
|
|
||||||
pair->dest_name, strerror(errno));
|
pair->dest_name, strerror(errno));
|
||||||
free(pair->dest_name);
|
free(pair->dest_name);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue