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