Skip to content

Commit

Permalink
Invert if condition in ContentSettingsFragment.setImportExportDataPat…
Browse files Browse the repository at this point in the history
…h for better readability
  • Loading branch information
ATofighi committed May 21, 2021
1 parent fa2b11b commit 92ab9ca
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,15 @@ private void importDatabase(final String filePath) {

private void setImportExportDataPath(final File file) {
final String directoryPath;
if (!file.isDirectory()) {
if (file.isDirectory()) {
directoryPath = file.getAbsolutePath();
} else {
final File parentFile = file.getParentFile();
if (parentFile != null) {
directoryPath = parentFile.getAbsolutePath();
} else {
directoryPath = "";
}
} else {
directoryPath = file.getAbsolutePath();
}
defaultPreferences.edit().putString(importExportDataPathKey, directoryPath).apply();
}
Expand Down

0 comments on commit 92ab9ca

Please sign in to comment.