From 4f8fe4e9670d5cf1176e257bb0df9ab86af5ae44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 1 Dec 2015 13:52:25 +0100 Subject: [PATCH] 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) --- F-Droid/src/org/fdroid/fdroid/compat/FileCompat.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/F-Droid/src/org/fdroid/fdroid/compat/FileCompat.java b/F-Droid/src/org/fdroid/fdroid/compat/FileCompat.java index def9164c4..aae28192c 100644 --- a/F-Droid/src/org/fdroid/fdroid/compat/FileCompat.java +++ b/F-Droid/src/org/fdroid/fdroid/compat/FileCompat.java @@ -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";