Commit 44292c20 authored by Roumen Petrov's avatar Roumen Petrov
Browse files

use directly File.canExecute() as current minimum is 9

parent c94cb5a8
......@@ -30,7 +30,6 @@
import jackpal.androidterm.emulatorview.TermSession;
import jackpal.androidterm.emulatorview.UpdateCallback;
import jackpal.androidterm.compat.FileCompat;
import jackpal.androidterm.util.TermSettings;
/**
......
......@@ -20,7 +20,6 @@
import android.os.Message;
import android.os.ParcelFileDescriptor;
import android.util.Log;
import jackpal.androidterm.compat.FileCompat;
import jackpal.androidterm.util.TermSettings;
import java.io.*;
......@@ -106,7 +105,7 @@ private String checkPath(String path) {
StringBuilder checkedPath = new StringBuilder(path.length());
for (String dirname : dirs) {
File dir = new File(dirname);
if (dir.isDirectory() && FileCompat.canExecute(dir)) {
if (dir.isDirectory() && dir.canExecute()) {
checkedPath.append(dirname);
checkedPath.append(":");
}
......@@ -139,7 +138,7 @@ private int createSubprocess(String shell, String[] env) throws IOException {
if (!file.exists()) {
Log.e(TermDebug.LOG_TAG, "Shell " + arg0 + " not found!");
throw new FileNotFoundException(arg0);
} else if (!FileCompat.canExecute(file)) {
} else if (!file.canExecute()) {
Log.e(TermDebug.LOG_TAG, "Shell " + arg0 + " not executable!");
throw new FileNotFoundException(arg0);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment