fixed removal of predownloaded files

This commit is contained in:
LagradOst 2023-08-24 16:39:50 +02:00
parent 823ffd8708
commit 460b1be525
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ interface SafeFile {
// because UniFile sucks balls on Media we have to do this
val absPath = file.absolutePath.removePrefix(File.separator)
for (value in MediaFileContentType.values()) {
val prefixes = listOf(value.toAbsolutePath(), value.toPath())
val prefixes = listOf(value.toAbsolutePath(), value.toPath()).map { it.removePrefix(File.separator) }
for (prefix in prefixes) {
if (!absPath.startsWith(prefix)) continue
return fromMedia(