We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa2b11b commit 92ab9caCopy full SHA for 92ab9ca
1 file changed
app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java
@@ -257,15 +257,15 @@ private void importDatabase(final String filePath) {
257
258
private void setImportExportDataPath(final File file) {
259
final String directoryPath;
260
- if (!file.isDirectory()) {
+ if (file.isDirectory()) {
261
+ directoryPath = file.getAbsolutePath();
262
+ } else {
263
final File parentFile = file.getParentFile();
264
if (parentFile != null) {
265
directoryPath = parentFile.getAbsolutePath();
266
} else {
267
directoryPath = "";
268
}
- } else {
- directoryPath = file.getAbsolutePath();
269
270
defaultPreferences.edit().putString(importExportDataPathKey, directoryPath).apply();
271
0 commit comments