Skip to content

Commit 96d341e

Browse files
sentinelwebsentinelweb
authored andcommitted
#496 - fix GetFolderListUseCase.kt
1 parent 57e54e2 commit 96d341e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

shared/src/commonMain/kotlin/uk/co/sentinelweb/cuer/app/usecase/GetFolderListUseCase.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class GetFolderListUseCase(
3636
} else {
3737
folderPath
3838
.let { fullTruncatedPathMapper.truncatedToFullFolderPath(it) }
39+
?.takeIf { it.indexOf(folderPath) > 0 } // enforces path beginning with a root on input
3940
?.takeIf { fullTruncatedPathMapper.checkFolderPathIsInAllowedSet(it) }
4041
?.let { AFile(it) }
4142
?.takeIf { fileOperations.exists(it) }

0 commit comments

Comments
 (0)