Files
orca/src/shared
Brennan BensonandEng. Mahmoud Bek ElNemer 0f89de5276 Save a pasted workspace directory as the path it names (#40347)
* Save a pasted workspace directory as the path it names

A workspace directory with a leading space (" /Users/me/dev") was saved as
typed. Readers treat it as relative, so Orca resolved it inside every
registered repository and created an empty " /Users/me/dev" tree in each.
Normalize the saved value once where settings are written and loaded, as
the leading ~ fix did: leading whitespace before an absolute or home path is
dropped, while relative paths and trailing characters stay exact. A value
repaired on load keeps its old spelling in history so checkouts under the
old root stay visible. The settings field shows the saved value.

Co-authored-by: Eng. Mahmoud Bek ElNemer <ElNeMeR70@users.noreply.github.com>

* Expand ~\ only where it is a home path; drop type casts

* Classify the padded path with the host's own path rules

On macOS and Linux a leading backslash is part of a relative name, so only
Windows treats \work as absolute.

---------

Co-authored-by: Eng. Mahmoud Bek ElNemer <ElNeMeR70@users.noreply.github.com>
2026-11-09 12:03:33 -08:00
..
…