This commit is contained in:
len 2016-04-12 22:41:45 +02:00
parent e753539c6d
commit 6cbdbb5be3

View file

@ -24,11 +24,6 @@ class PreferencesHelper(private val context: Context) {
defaultDownloadsDir = File(Environment.getExternalStorageDirectory().absolutePath + defaultDownloadsDir = File(Environment.getExternalStorageDirectory().absolutePath +
File.separator + context.getString(R.string.app_name), "downloads") File.separator + context.getString(R.string.app_name), "downloads")
// Create default directory
if (downloadsDirectory == defaultDownloadsDir.absolutePath && !defaultDownloadsDir.exists()) {
defaultDownloadsDir.mkdirs()
}
// Don't display downloaded chapters in gallery apps creating a ".nomedia" file // Don't display downloaded chapters in gallery apps creating a ".nomedia" file
try { try {
File(downloadsDirectory, ".nomedia").createNewFile() File(downloadsDirectory, ".nomedia").createNewFile()