Skip to content

Commit 22c233a

Browse files
committed
fix case zpaq error
1 parent de90394 commit 22c233a

File tree

5 files changed

+26
-19
lines changed

5 files changed

+26
-19
lines changed

PowerFileExplorer/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
44
package="net.gnu.explorer"
55
android:versionCode="64"
6-
android:versionName="1.0.12"
6+
android:versionName="1.0.13"
77
>
88

99
<!-- Min/target SDK versions (<uses-sdk>) managed by build.gradle

PowerFileExplorer/src/main/java/net/gnu/explorer/ContentFragment.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,23 +1921,24 @@ public void run() {
19211921
activity, selectedInList1, activity.getAppTheme(), activity.callback);
19221922
activity.callback = null;
19231923
} else {
1924+
if (activity.curExplorerFrag.commands.getVisibility() == View.VISIBLE && activity.curExplorerFrag.selectedInList1.size() == 0) {
1925+
activity.curExplorerFrag.commands.setAnimation(AnimationUtils.loadAnimation(activity, R.anim.shrink_from_top));
1926+
activity.curExplorerFrag.commands.setVisibility(View.GONE);
1927+
activity.curExplorerFrag.horizontalDivider6.setVisibility(View.GONE);
1928+
activity.curExplorerFrag.updateDelPaste();
1929+
}
1930+
if (activity.curContentFrag.commands.getVisibility() == View.VISIBLE && activity.curContentFrag.selectedInList1.size() == 0) {
1931+
activity.curContentFrag.commands.setAnimation(AnimationUtils.loadAnimation(activity, R.anim.shrink_from_top));
1932+
activity.curContentFrag.commands.setVisibility(View.GONE);
1933+
activity.curContentFrag.horizontalDivider6.setVisibility(View.GONE);
1934+
activity.curContentFrag.updateDelPaste();
1935+
}
19241936
if (activity.MOVE_PATH != null || activity.COPY_PATH != null) {
19251937
String path = currentPathTitle;
19261938
ArrayList<BaseFile> arrayList = activity.COPY_PATH != null ? activity.COPY_PATH: activity.MOVE_PATH;
19271939
boolean move = activity.MOVE_PATH != null;
19281940
new CopyFileCheck(this, path, move, activity, ThemedActivity.rootMode, activity.callback)
19291941
.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, arrayList);
1930-
if (slidingTabsFragment.side == SlidingTabsFragment.Side.LEFT && activity.curExplorerFrag.commands.getVisibility() == View.VISIBLE && activity.curExplorerFrag.selectedInList1.size() == 0) {
1931-
activity.curExplorerFrag.commands.setAnimation(AnimationUtils.loadAnimation(activity, R.anim.shrink_from_top));
1932-
activity.curExplorerFrag.commands.setVisibility(View.GONE);
1933-
activity.curExplorerFrag.horizontalDivider6.setVisibility(View.GONE);
1934-
activity.curExplorerFrag.updateDelPaste();
1935-
} else if (slidingTabsFragment.side == SlidingTabsFragment.Side.RIGHT && activity.curContentFrag.commands.getVisibility() == View.VISIBLE && activity.curContentFrag.selectedInList1.size() == 0) {
1936-
activity.curContentFrag.commands.setAnimation(AnimationUtils.loadAnimation(activity, R.anim.shrink_from_top));
1937-
activity.curContentFrag.commands.setVisibility(View.GONE);
1938-
activity.curContentFrag.horizontalDivider6.setVisibility(View.GONE);
1939-
activity.curContentFrag.updateDelPaste();
1940-
}
19411942
activity.MOVE_PATH = null;
19421943
activity.COPY_PATH = null;
19431944
activity.callback = null;

PowerFileExplorer/src/main/java/net/gnu/explorer/ZipFragment.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,10 @@ protected List<ZipEntry> doInBackground(Object... params) {
15671567
}
15681568
curPath = "/";
15691569
activity.zip = zip;
1570+
if (zip == null) {
1571+
Toast.makeText(activity, "Archive error", Toast.LENGTH_LONG);
1572+
return dataSourceL1a;
1573+
}
15701574
} else {
15711575
curPath = path;
15721576
}
@@ -1599,7 +1603,7 @@ protected List<ZipEntry> doInBackground(Object... params) {
15991603
@Override
16001604
protected void onPostExecute(List<ZipEntry> dataSourceL1a) {
16011605
//Log.d(TAG, "LoadFiles.onPostExecute.dataSourceL1a=" + Util.collectionToString(dataSourceL1a, false, "\n"));
1602-
if (currentPathTitle != null) {
1606+
if (currentPathTitle != null && zip != null) {
16031607
if (currentPathTitle.startsWith("/")) {
16041608
rightStatus.setText(
16051609
Formatter.formatFileSize(activity, zip.file.length())

PowerFileExplorer/src/main/java/net/gnu/zpaq/Zpaq.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,11 @@ public void updateProgress(String[] args) {
173173
CommandListener commandListener = new CommandListener(command, update);
174174
command.setCommandListener(commandListener);
175175
command.run();
176-
int ret = commandListener.ret;
176+
final int ret = commandListener.ret;
177177
Log.d(TAG, "ret " + ret);
178+
if (ret != 0) {
179+
return null;
180+
}
178181
String line ="";
179182
final Matcher m = patLn.matcher(sb.toString());
180183
final Calendar cal = Calendar.getInstance();

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
An extreme powerful file explorer, two custom panels, built-in images/document preview, media player, pdf/image viewer, text editor, apps, processes, traffic manager, compress/descompress zip, 7z, zpaq, gz, xz, bz2, tgz, txz, tbz2...
44

55

6-
[<img alt="Get it on Github" height="40" width="100" src="https://github.githubassets.com/images/modules/logos_page/GitHub-Logo.png">](https://github.com/PowerExplorer/PowerFileExplorer/releases/download/V1.0.10/PowerFileExplorer.apk.zip)
6+
[<img alt="Get it on Github" height="40" width="100" src="https://github.githubassets.com/images/modules/logos_page/GitHub-Logo.png">](https://github.com/PowerExplorer/PowerFileExplorer/releases/download/V1.0.12/PowerFileExplorer.apk.zip)
77

8-
https://github.com/PowerExplorer/PowerFileExplorer/releases/download/V1.0.12/PowerFileExplorer.apk.zip
8+
Download https://github.com/PowerExplorer/PowerFileExplorer/releases/download/V1.0.12/PowerFileExplorer.apk.zip
99

1010

1111
# Prepare for build
1212
Copy attached android.jar onto %your-android-sdk%/platforms/android-23/ (needs overwrite)
13-
1413
(You should backup original android.jar)
1514

1615

@@ -76,8 +75,8 @@ Other Features
7675

7776

7877
# License:
79-
---
80-
This file is part of Power File Manager.
78+
79+
This file is a part of Power File Manager.
8180
Power File Manager is free software: you can redistribute it and/or modify
8281
it under the terms of the GNU General Public License as published by
8382
the Free Software Foundation, either version 3 of the License, or

0 commit comments

Comments
 (0)