Fix! resolve absolute file paths - Windows

This commit is contained in:
Hasinjato 2026-09-23 14:50:00 +03:00
parent 21e3c108c8
commit 183467fddd

View file

@ -49,8 +49,9 @@ class DesktopFileRepository : FileRepository { // IMPORTS AND IMPLEMENTS THE com
file.writeBytes(data)
}
override suspend fun saveLocalFile(filePath: String, data: ByteArray) {
val file = if (filePath.startsWith("/")) {
File(filePath)
val targetFile = File(filePath)
val file = if (targetFile.isAbsolute) {
targetFile
} else {
File(getAppPublicFolder(), filePath)
}