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)
|
file.writeBytes(data)
|
||||||
}
|
}
|
||||||
override suspend fun saveLocalFile(filePath: String, data: ByteArray) {
|
override suspend fun saveLocalFile(filePath: String, data: ByteArray) {
|
||||||
val file = if (filePath.startsWith("/")) {
|
val targetFile = File(filePath)
|
||||||
File(filePath)
|
val file = if (targetFile.isAbsolute) {
|
||||||
|
targetFile
|
||||||
} else {
|
} else {
|
||||||
File(getAppPublicFolder(), filePath)
|
File(getAppPublicFolder(), filePath)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue