What's wrong
The "Set Dev Directory" popup callback (ProjectDirector/ProjectDirector.cs:876-885) passes whatever the user typed straight to AbsoluteDirectoryPath.Create<AbsoluteDirectoryPath>(result). The only guard is string.IsNullOrEmpty.
With ktsu.Semantics.Paths 5.11.0 (the pinned version), these inputs all throw ArgumentException: Cannot convert "..." to AbsoluteDirectoryPath:
dev (relative)
~/dev
" /tmp/x" (leading space)
"\"C:\\dev\"" (quoted)
The callback runs from PopupSetDevDirectory.ShowIfOpen() inside Tick (ProjectDirector.cs:684), which is the render thread. Nothing there catches the exception, so it escapes the render loop and takes the app down. #440 and #444 treat a throw on the render thread the same way.
Failure scenario
On Windows, a user copies their dev folder with Explorer's "Copy as path", which wraps it in quotes ("C:\dev"). They paste it into the popup and press OK, and the app crashes. Typing ~/dev or a relative folder name does the same.
Suggested fix
- Trim whitespace and a surrounding pair of quotes from the input.
- Optionally expand a leading
~ to the user profile directory.
- Validate with
Path.IsPathFullyQualified, or catch ArgumentException. On rejection, QueueLog the reason and keep the previous DevDirectory.
Acceptance criteria
- Entering
dev, "C:\dev", ~/dev or " C:\dev " never throws.
- Each input either sets a valid absolute
DevDirectory (for the quoted and padded cases) or leaves it unchanged and logs why the input was refused.
What's wrong
The "Set Dev Directory" popup callback (
ProjectDirector/ProjectDirector.cs:876-885) passes whatever the user typed straight toAbsoluteDirectoryPath.Create<AbsoluteDirectoryPath>(result). The only guard isstring.IsNullOrEmpty.With ktsu.Semantics.Paths 5.11.0 (the pinned version), these inputs all throw
ArgumentException: Cannot convert "..." to AbsoluteDirectoryPath:dev(relative)~/dev" /tmp/x"(leading space)"\"C:\\dev\""(quoted)The callback runs from
PopupSetDevDirectory.ShowIfOpen()insideTick(ProjectDirector.cs:684), which is the render thread. Nothing there catches the exception, so it escapes the render loop and takes the app down. #440 and #444 treat a throw on the render thread the same way.Failure scenario
On Windows, a user copies their dev folder with Explorer's "Copy as path", which wraps it in quotes (
"C:\dev"). They paste it into the popup and press OK, and the app crashes. Typing~/devor a relative folder name does the same.Suggested fix
~to the user profile directory.Path.IsPathFullyQualified, or catchArgumentException. On rejection,QueueLogthe reason and keep the previousDevDirectory.Acceptance criteria
dev,"C:\dev",~/devor" C:\dev "never throws.DevDirectory(for the quoted and padded cases) or leaves it unchanged and logs why the input was refused.