1
0
Fork 0
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:
Lasse Collin 2009-11-28 17:45:22 +02:00
parent f057a33c6f
commit e0c2776b6f

View file

@ -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;