Fix save log & repo (#1597)
This commit is contained in:
parent
c7d82fee37
commit
1be8257252
|
|
@ -96,6 +96,7 @@ public class LogsFragment extends BaseFragment {
|
|||
} catch (IOException e) {
|
||||
var text = context.getString(R.string.logs_save_failed2, e.getMessage());
|
||||
showHint(text, false);
|
||||
Log.w(App.TAG, "save log", e);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ public class RepoFragment extends BaseFragment implements RepoLoader.RepoListene
|
|||
@SuppressLint("NotifyDataSetChanged")
|
||||
private void setLoaded(List<OnlineModule> list, boolean isLoaded) {
|
||||
runOnUiThread(() -> {
|
||||
showList = list;
|
||||
if (list != null) showList = list;
|
||||
this.isLoaded = isLoaded;
|
||||
notifyDataSetChanged();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -210,9 +210,11 @@ public class ConfigFileManager {
|
|||
private static void putFds(Map<String, ParcelFileDescriptor> map, Path path) throws IOException {
|
||||
Files.walkFileTree(path, new SimpleFileVisitor<>() {
|
||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
|
||||
var name = path.getParent().relativize(file).toString();
|
||||
var fd = ParcelFileDescriptor.open(file.toFile(), ParcelFileDescriptor.MODE_READ_ONLY);
|
||||
map.put(name, fd);
|
||||
if (Files.isRegularFile(file)) {
|
||||
var name = path.getParent().relativize(file).toString();
|
||||
var fd = ParcelFileDescriptor.open(file.toFile(), ParcelFileDescriptor.MODE_READ_ONLY);
|
||||
map.put(name, fd);
|
||||
}
|
||||
return FileVisitResult.CONTINUE;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue