FileCompat: fix setExecutable signature
For some reason its first argument was "readable", while it clearly should be "executable" as per the code below. Also see the method we call on api 9 and newer: https://developer.android.com/reference/java/io/File.html#setReadable(boolean, boolean)
This commit is contained in:
parent
30bc2cf8d5
commit
4f8fe4e967
@ -118,13 +118,13 @@ public class FileCompat extends Compatibility {
|
||||
}
|
||||
|
||||
@TargetApi(9)
|
||||
public static boolean setExecutable(SanitizedFile file, boolean readable, boolean ownerOnly) {
|
||||
public static boolean setExecutable(SanitizedFile file, boolean executable, boolean ownerOnly) {
|
||||
|
||||
if (hasApi(9)) {
|
||||
return file.setExecutable(readable, ownerOnly);
|
||||
return file.setExecutable(executable, ownerOnly);
|
||||
}
|
||||
String mode;
|
||||
if (readable) {
|
||||
if (executable) {
|
||||
mode = ownerOnly ? "0700" : "0711";
|
||||
} else {
|
||||
mode = ownerOnly ? "0600" : "0600";
|
||||
|
Loading…
x
Reference in New Issue
Block a user