mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
fixed possible NPE + formatting
This commit is contained in:
parent
68eada9752
commit
95743e388b
1 changed files with 28 additions and 27 deletions
|
@ -1049,12 +1049,13 @@ public class FileChooserActivity extends Activity {
|
|||
}
|
||||
|
||||
final IFileProvider fileProvider = mFileProvider;
|
||||
if (fileProvider == null) {
|
||||
final IFile location = getLocation();
|
||||
if (fileProvider == null || location == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
IFile dir = fileProvider.fromPath(String
|
||||
.format("%s/%s", getLocation().getAbsolutePath(), name));
|
||||
.format("%s/%s", location.getAbsolutePath(), name));
|
||||
if (dir.mkdir()) {
|
||||
Dlg.toast(FileChooserActivity.this, getString(R.string.afc_msg_done), Dlg._LengthShort);
|
||||
setLocation(getLocation(), null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue