Fix prefs on other user (#1929)

This commit is contained in:
南宫雪珊 2022-05-10 22:17:00 +08:00 committed by GitHub
parent c99c3b1165
commit b36c170b8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ public class ConfigManager {
miscPath = string; miscPath = string;
} }
try { try {
Path prefs = Paths.get(miscPath + "/prefs"); Path prefs = Paths.get(miscPath);
var perms = PosixFilePermissions.fromString("rwx--x--x"); var perms = PosixFilePermissions.fromString("rwx--x--x");
Files.createDirectories(prefs, PosixFilePermissions.asFileAttribute(perms)); Files.createDirectories(prefs, PosixFilePermissions.asFileAttribute(perms));
walkFileTree(prefs, f -> SELinux.setFileContext(f.toString(), "u:object_r:magisk_file:s0")); walkFileTree(prefs, f -> SELinux.setFileContext(f.toString(), "u:object_r:magisk_file:s0"));