mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fixed removal of predownloaded files
This commit is contained in:
parent
823ffd8708
commit
460b1be525
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ interface SafeFile {
|
||||||
// because UniFile sucks balls on Media we have to do this
|
// because UniFile sucks balls on Media we have to do this
|
||||||
val absPath = file.absolutePath.removePrefix(File.separator)
|
val absPath = file.absolutePath.removePrefix(File.separator)
|
||||||
for (value in MediaFileContentType.values()) {
|
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) {
|
for (prefix in prefixes) {
|
||||||
if (!absPath.startsWith(prefix)) continue
|
if (!absPath.startsWith(prefix)) continue
|
||||||
return fromMedia(
|
return fromMedia(
|
||||||
|
|
Loading…
Reference in a new issue