mirror of https://git.tukaani.org/xz.git
Remove duplicate code in io_open_dest().
Fix a missing _() in the error message too.
This commit is contained in:
parent
f057a33c6f
commit
e0c2776b6f
|
@ -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 New Issue