File tree Expand file tree Collapse file tree
macos/Sources/Ghostty/Surface View Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -612,20 +612,13 @@ extension Ghostty {
612612 /// Explicit font size to use in points
613613 var fontSize : Float32 ?
614614
615- private var normalizedWorkingDirectory : String ?
616- /// Explicit working directory to set
615+ /// Explicit working directory. This is normalized on assignment to
616+ /// remove any redundant and trailing path separators.
617617 var workingDirectory : String ? {
618618 get { normalizedWorkingDirectory }
619- set {
620- guard let newValue else {
621- normalizedWorkingDirectory = nil
622- return
623- }
624- // We use FilePath to normalize separators by removing redundant intermediary separators
625- // and stripping any trailing separators.
626- normalizedWorkingDirectory = FilePath ( newValue) . string
627- }
619+ set { normalizedWorkingDirectory = newValue. map { FilePath ( $0) . string } }
628620 }
621+ private var normalizedWorkingDirectory : String ?
629622
630623 /// Explicit command to set
631624 var command : String ?
You can’t perform that action at this time.
0 commit comments