Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit b663fbe

Browse files
committed
Workaround to prevent crash on first run (#898)
Signed-off-by: Harsh Shandilya <[email protected]> (cherry picked from commit 57f125a) Signed-off-by: Harsh Shandilya <[email protected]>
1 parent 52808fb commit b663fbe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/src/main/java/com/zeapo/pwdstore/SearchableRepositoryViewModel.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ class SearchableRepositoryViewModel(application: Application) : AndroidViewModel
291291
recyclerViewState: Parcelable? = null,
292292
pushPreviousLocation: Boolean = true
293293
) {
294+
if (!newDirectory.exists()) return
294295
require(newDirectory.isDirectory) { "Can only navigate to a directory" }
295296
if (pushPreviousLocation) {
296297
navigationStack.push(NavigationStackEntry(_currentDir.value!!, recyclerViewState))

0 commit comments

Comments
 (0)