Skip to content

Commit ff0bea0

Browse files
fix: allow creating directories in file sync local file picker (#199)
Closes #198. I just assumed this was on by default 😭 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 ```
1 parent 15f1890 commit ff0bea0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Coder-Desktop/Coder-Desktop/Views/FileSync/FileSyncSessionModal.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ struct FileSyncSessionModal<VPN: VPNService, FS: FileSyncDaemon>: View {
2828
Button {
2929
let panel = NSOpenPanel()
3030
panel.directoryURL = FileManager.default.homeDirectoryForCurrentUser
31+
panel.canCreateDirectories = true
3132
panel.allowsMultipleSelection = false
3233
panel.canChooseDirectories = true
3334
panel.canChooseFiles = false

0 commit comments

Comments
 (0)