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 4720ba6 commit faa427aCopy full SHA for faa427a
app/src/main/kotlin/com/simplemobiletools/notes/dialogs/SaveAsDialog.kt
@@ -1,5 +1,6 @@
1
package com.simplemobiletools.notes.dialogs
2
3
+import android.os.Environment
4
import android.support.v7.app.AlertDialog
5
import android.view.LayoutInflater
6
import android.view.WindowManager
@@ -14,7 +15,7 @@ import java.io.File
14
15
class SaveAsDialog(val activity: SimpleActivity, val note: Note, val callback: (savePath: String) -> Unit) {
16
17
init {
- var realPath = File(note.path).parent
18
+ var realPath = File(note.path).parent ?: Environment.getExternalStorageDirectory().toString()
19
val view = LayoutInflater.from(activity).inflate(R.layout.dialog_save_as, null).apply {
20
file_path.text = activity.humanizePath(realPath)
21
0 commit comments