Skip to content

Commit bcea718

Browse files
author
Jan Guegel
committed
include getDoesFilePathExist check, just to be sure
Signed-off-by: Jan Guegel <[email protected]>
1 parent 36acf9d commit bcea718

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/kotlin/org/fossify/filemanager/fragments/RecentsFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import android.util.AttributeSet
88
import androidx.core.os.bundleOf
99
import org.fossify.commons.extensions.areSystemAnimationsEnabled
1010
import org.fossify.commons.extensions.beVisibleIf
11+
import org.fossify.commons.extensions.getDoesFilePathExist
1112
import org.fossify.commons.extensions.getFilenameFromPath
1213
import org.fossify.commons.extensions.getLongValue
1314
import org.fossify.commons.extensions.getStringValue
@@ -180,7 +181,7 @@ class RecentsFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
180181
val isHiddenFile = name.startsWith(".")
181182
val isFileInHiddenFolder = isPathInHiddenFolder(path)
182183
val shouldShow = showHidden || (!isHiddenFile && !isFileInHiddenFolder)
183-
if (shouldShow) {
184+
if (shouldShow && activity?.getDoesFilePathExist(path) == true) {
184185
if (wantedMimeTypes.any { isProperMimeType(it, path, false) }) {
185186
val fileDirItem = ListItem(path, name, false, 0, size, modified, false, false)
186187
listItems.add(fileDirItem)

0 commit comments

Comments
 (0)