Fix! resolve absolute file paths - Windows
This commit is contained in:
parent
21e3c108c8
commit
183467fddd
1 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue