diff --git a/primitiveFTPd/build.gradle b/primitiveFTPd/build.gradle index 39393a6c..191a35e5 100644 --- a/primitiveFTPd/build.gradle +++ b/primitiveFTPd/build.gradle @@ -13,7 +13,7 @@ buildscript { repositories { google() mavenCentral() - jcenter() + maven { url 'https://jitpack.io' } } apply plugin: 'com.android.application' @@ -98,7 +98,7 @@ dependencies { implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' implementation 'androidx.preference:preference:1.2.1' implementation 'com.google.android.material:material:1.6.0' - implementation 'eu.chainfire:libsuperuser:1.0.0.201704021214' + implementation 'eu.chainfire:libsuperuser:1.1.1' implementation 'org.apache.httpcomponents.client5:httpclient5:5.0' implementation ('me.dm7.barcodescanner:zxing:1.9.8') { exclude group: 'com.android.support' diff --git a/primitiveFTPd/src/org/primftpd/filesystem/RootFile.java b/primitiveFTPd/src/org/primftpd/filesystem/RootFile.java index 6eded851..749a2b81 100644 --- a/primitiveFTPd/src/org/primftpd/filesystem/RootFile.java +++ b/primitiveFTPd/src/org/primftpd/filesystem/RootFile.java @@ -127,13 +127,16 @@ public List listFiles() { final List beans = new ArrayList<>(); shell.addCommand("ls -la " + escapePath(absPath), 0, new Shell.OnCommandLineListener() { @Override - public void onLine(String s) { + public void onSTDOUT(String s) { LsOutputBean bean = parser.parseLine(s); if (bean != null) { beans.add(bean); } } @Override + public void onSTDERR(String s) { + } + @Override public void onCommandResult(int i, int i1) { } }); @@ -340,7 +343,10 @@ protected boolean runCommand(String cmd) { final Boolean[] wrapper = new Boolean[1]; shell.addCommand(cmd, 0, new Shell.OnCommandLineListener() { @Override - public void onLine(String s) { + public void onSTDOUT(String s) { + } + @Override + public void onSTDERR(String s) { } @Override public void onCommandResult(int i, int i1) { @@ -358,11 +364,14 @@ protected String readCommandOutput(String cmd) { public void onCommandResult(int i, int i1) { } @Override - public void onLine(String s) { + public void onSTDOUT(String s) { if (s != null) { sb.append(s); } } + @Override + public void onSTDERR(String s) { + } }); shell.waitForIdle(); String result = sb.toString(); diff --git a/primitiveFTPd/src/org/primftpd/filesystem/RootFileSystemView.java b/primitiveFTPd/src/org/primftpd/filesystem/RootFileSystemView.java index a82b8923..c9ae2e1f 100644 --- a/primitiveFTPd/src/org/primftpd/filesystem/RootFileSystemView.java +++ b/primitiveFTPd/src/org/primftpd/filesystem/RootFileSystemView.java @@ -81,10 +81,13 @@ protected LsOutputBean findFinalLinkTarget(LsOutputBean bean, final LsOutputPars while (tmp.isLink()) { shell.addCommand("ls -lad \"" + tmp.getLinkTarget() + "\"", 0, new Shell.OnCommandLineListener() { @Override - public void onLine(String s) { + public void onSTDOUT(String s) { wrapper[0] = parser.parseLine(s); } @Override + public void onSTDERR(String s) { + } + @Override public void onCommandResult(int i, int i1) { } });