Skip to content

Commit 3bbe848

Browse files
authored
fix: #516 change path (#519)
1 parent 1d14f5e commit 3bbe848

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

FloconDesktop/data/remote/src/desktopMain/kotlin/com/flocon/data/remote/server/ServerJvm.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ class ServerJvm(
189189
if (httpServer != null)
190190
return
191191

192-
val desktopPath = Paths.get(System.getProperty("user.home"), "Desktop", "Flocon", "Files").absolutePathString()
193-
File(desktopPath).also {
192+
val rootFloconFolder = Paths.get(System.getProperty("user.home"), ".flocon", "Files")
193+
.absolutePathString()
194+
File(rootFloconFolder).also {
194195
if (!it.exists()) {
195196
it.mkdirs()
196197
}
@@ -214,7 +215,7 @@ class ServerJvm(
214215

215216
is PartData.FileItem -> {
216217
val fileName = part.originalFileName ?: "flocon_file${System.currentTimeMillis()}.bin"
217-
val targetFile = File(desktopPath, fileName)
218+
val targetFile = File(rootFloconFolder, fileName)
218219
part.streamProvider().use { input ->
219220
targetFile.outputStream().use { output ->
220221
input.copyTo(output)

FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/device/usecase/StopRecordingVideoUseCase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class StopRecordingVideoUseCase(
2727
// wait until the record is done
2828
recording.completableDeferred.await()
2929

30-
val parentFile = Paths.get(System.getProperty("user.home"), "Desktop", "Flocon", "ScreenRecord").toFile()
30+
val parentFile = Paths.get(System.getProperty("user.home"), ".flocon", "ScreenRecord").toFile()
3131
if (!parentFile.exists()) {
3232
parentFile.mkdirs()
3333
}

FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/device/usecase/TakeScreenshotUseCase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class TakeScreenshotUseCase(
1919
val fileName = "screenshot_${current.packageName}_${System.currentTimeMillis()}.png"
2020
val onDeviceFilePath = "/sdcard/$fileName"
2121

22-
val parentFile = Paths.get(System.getProperty("user.home"), "Desktop", "Flocon", "Screenshot").toFile()
22+
val parentFile = Paths.get(System.getProperty("user.home"), ".flocon", "Screenshot").toFile()
2323
if (!parentFile.exists()) {
2424
parentFile.mkdirs()
2525
}

0 commit comments

Comments
 (0)