For #27269: Use parentFile method over substring extraction
This fixes gradle tests on Windows, where the file separator is "\" and not "/".
This commit is contained in:
parent
35e0afe329
commit
f352a4f9dc
|
@ -80,7 +80,7 @@ class WallpaperDownloader(
|
|||
if (!response.isSuccess) {
|
||||
throw IllegalStateException()
|
||||
}
|
||||
File(localFile.path.substringBeforeLast("/")).mkdirs()
|
||||
localFile.parentFile?.mkdirs()
|
||||
response.body.useStream { input ->
|
||||
input.copyTo(localFile.outputStream())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue