mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-18 05:58:30 +00:00
Always resolve to canonical path
This commit is contained in:
parent
a5cc31783c
commit
6099f3b015
@ -192,9 +192,11 @@ void install_module(const char *file) {
|
|||||||
if (access(file, F_OK))
|
if (access(file, F_OK))
|
||||||
abort(stderr, "'%s' does not exist", file);
|
abort(stderr, "'%s' does not exist", file);
|
||||||
|
|
||||||
|
char *zip = realpath(file, nullptr);
|
||||||
setenv("OUTFD", "1", 1);
|
setenv("OUTFD", "1", 1);
|
||||||
setenv("ZIPFILE", file, 1);
|
setenv("ZIPFILE", zip, 1);
|
||||||
setenv("ASH_STANDALONE", "1", 1);
|
setenv("ASH_STANDALONE", "1", 1);
|
||||||
|
free(zip);
|
||||||
|
|
||||||
int fd = xopen("/dev/null", O_RDONLY);
|
int fd = xopen("/dev/null", O_RDONLY);
|
||||||
xdup2(fd, STDERR_FILENO);
|
xdup2(fd, STDERR_FILENO);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user