archive: utimes modifies file, not link so don't use it for symlinks
parent
0365f7462b
commit
4d5efe6a05
|
@ -257,13 +257,15 @@ int apk_archive_entry_extract(const struct apk_file_info *ae,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* preserve modification time */
|
if (!S_ISLNK(ae->mode)) {
|
||||||
utb.actime = utb.modtime = ae->mtime;
|
/* preserve modification time */
|
||||||
r = utime(fn, &utb);
|
utb.actime = utb.modtime = ae->mtime;
|
||||||
if (r < 0) {
|
r = utime(fn, &utb);
|
||||||
apk_error("Failed to preserve modification time on %s: %s",
|
if (r < 0) {
|
||||||
fn, strerror(errno));
|
apk_error("Failed to preserve modification time on %s: %s",
|
||||||
return -errno;
|
fn, strerror(errno));
|
||||||
|
return -errno;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
apk_error("Failed to extract %s: %s", ae->name, strerror(errno));
|
apk_error("Failed to extract %s: %s", ae->name, strerror(errno));
|
||||||
|
|
Loading…
Reference in New Issue