From db8125b10e02789e6f2bfa6b30a3557acc034fa4 Mon Sep 17 00:00:00 2001 From: Raphael TEYSSANDIER Date: Wed, 8 Apr 2026 14:40:58 +0200 Subject: [PATCH 1/2] fix: #516 change path --- .../kotlin/com/flocon/data/remote/server/ServerJvm.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FloconDesktop/data/remote/src/desktopMain/kotlin/com/flocon/data/remote/server/ServerJvm.kt b/FloconDesktop/data/remote/src/desktopMain/kotlin/com/flocon/data/remote/server/ServerJvm.kt index 63184c046..03d127213 100644 --- a/FloconDesktop/data/remote/src/desktopMain/kotlin/com/flocon/data/remote/server/ServerJvm.kt +++ b/FloconDesktop/data/remote/src/desktopMain/kotlin/com/flocon/data/remote/server/ServerJvm.kt @@ -189,7 +189,8 @@ class ServerJvm( if (httpServer != null) return - val desktopPath = Paths.get(System.getProperty("user.home"), "Desktop", "Flocon", "Files").absolutePathString() + val desktopPath = Paths.get(System.getProperty("user.home"), ".flocon", "Files") + .absolutePathString() File(desktopPath).also { if (!it.exists()) { it.mkdirs() From 719cfb3579802ac43be3039f612f17977ca4c530 Mon Sep 17 00:00:00 2001 From: Raphael TEYSSANDIER Date: Wed, 8 Apr 2026 14:47:18 +0200 Subject: [PATCH 2/2] fix: Change other path --- .../kotlin/com/flocon/data/remote/server/ServerJvm.kt | 6 +++--- .../domain/device/usecase/StopRecordingVideoUseCase.kt | 2 +- .../domain/device/usecase/TakeScreenshotUseCase.kt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/FloconDesktop/data/remote/src/desktopMain/kotlin/com/flocon/data/remote/server/ServerJvm.kt b/FloconDesktop/data/remote/src/desktopMain/kotlin/com/flocon/data/remote/server/ServerJvm.kt index 03d127213..ac443e2c4 100644 --- a/FloconDesktop/data/remote/src/desktopMain/kotlin/com/flocon/data/remote/server/ServerJvm.kt +++ b/FloconDesktop/data/remote/src/desktopMain/kotlin/com/flocon/data/remote/server/ServerJvm.kt @@ -189,9 +189,9 @@ class ServerJvm( if (httpServer != null) return - val desktopPath = Paths.get(System.getProperty("user.home"), ".flocon", "Files") + val rootFloconFolder = Paths.get(System.getProperty("user.home"), ".flocon", "Files") .absolutePathString() - File(desktopPath).also { + File(rootFloconFolder).also { if (!it.exists()) { it.mkdirs() } @@ -215,7 +215,7 @@ class ServerJvm( is PartData.FileItem -> { val fileName = part.originalFileName ?: "flocon_file${System.currentTimeMillis()}.bin" - val targetFile = File(desktopPath, fileName) + val targetFile = File(rootFloconFolder, fileName) part.streamProvider().use { input -> targetFile.outputStream().use { output -> input.copyTo(output) diff --git a/FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/device/usecase/StopRecordingVideoUseCase.kt b/FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/device/usecase/StopRecordingVideoUseCase.kt index e75a68837..08f0edbbe 100644 --- a/FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/device/usecase/StopRecordingVideoUseCase.kt +++ b/FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/device/usecase/StopRecordingVideoUseCase.kt @@ -27,7 +27,7 @@ class StopRecordingVideoUseCase( // wait until the record is done recording.completableDeferred.await() - val parentFile = Paths.get(System.getProperty("user.home"), "Desktop", "Flocon", "ScreenRecord").toFile() + val parentFile = Paths.get(System.getProperty("user.home"), ".flocon", "ScreenRecord").toFile() if (!parentFile.exists()) { parentFile.mkdirs() } diff --git a/FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/device/usecase/TakeScreenshotUseCase.kt b/FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/device/usecase/TakeScreenshotUseCase.kt index 85bcff92e..7d3b4bbfc 100644 --- a/FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/device/usecase/TakeScreenshotUseCase.kt +++ b/FloconDesktop/domain/src/commonMain/kotlin/io/github/openflocon/domain/device/usecase/TakeScreenshotUseCase.kt @@ -19,7 +19,7 @@ class TakeScreenshotUseCase( val fileName = "screenshot_${current.packageName}_${System.currentTimeMillis()}.png" val onDeviceFilePath = "/sdcard/$fileName" - val parentFile = Paths.get(System.getProperty("user.home"), "Desktop", "Flocon", "Screenshot").toFile() + val parentFile = Paths.get(System.getProperty("user.home"), ".flocon", "Screenshot").toFile() if (!parentFile.exists()) { parentFile.mkdirs() }