Correctly resolve realpath for absolute paths
Introduced by: https://android-review.googlesource.com/174475 Change-Id: I44e00040b28be167d5141454f919340afec6084e
This commit is contained in:

committed by
Dmitriy Ivanov

parent
fb7f45b6a3
commit
6f2d3104c8
@@ -1318,6 +1318,10 @@ static int open_library(ZipArchiveCache* zip_archive_cache,
|
||||
int fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_CLOEXEC));
|
||||
if (fd != -1) {
|
||||
*file_offset = 0;
|
||||
if (!realpath_fd(fd, realpath)) {
|
||||
PRINT("warning: unable to get realpath for the library \"%s\". Will use given path.", name);
|
||||
*realpath = name;
|
||||
}
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
Reference in New Issue
Block a user