From ff0bea04bdc10a11de4c7c41814b169c4d417a6a Mon Sep 17 00:00:00 2001 From: Ethan <39577870+ethanndickson@users.noreply.github.com> Date: Thu, 10 Jul 2025 23:24:11 +1000 Subject: [PATCH] fix: allow creating directories in file sync local file picker (#199) Closes #198. I just assumed this was on by default :sob: In fact, the documentation says it is, but it's very clearly not! ``` /** `NSSavePanel`/`NSOpenPanel`: Set to `YES` to show the "New Folder" button. Default is `YES`. */ open var canCreateDirectories: Bool ``` --- .../Coder-Desktop/Views/FileSync/FileSyncSessionModal.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Coder-Desktop/Coder-Desktop/Views/FileSync/FileSyncSessionModal.swift b/Coder-Desktop/Coder-Desktop/Views/FileSync/FileSyncSessionModal.swift index b5108670..63a1faaa 100644 --- a/Coder-Desktop/Coder-Desktop/Views/FileSync/FileSyncSessionModal.swift +++ b/Coder-Desktop/Coder-Desktop/Views/FileSync/FileSyncSessionModal.swift @@ -28,6 +28,7 @@ struct FileSyncSessionModal: View { Button { let panel = NSOpenPanel() panel.directoryURL = FileManager.default.homeDirectoryForCurrentUser + panel.canCreateDirectories = true panel.allowsMultipleSelection = false panel.canChooseDirectories = true panel.canChooseFiles = false