stash icon indicating copy to clipboard operation
stash copied to clipboard

fix: strip surrounding quotes from Windows paths via shared helpers

Open slick-daddy opened this issue 6 months ago • 3 comments

Fixes #294

When users copy file paths from Windows and paste them into the library path input, the pasted text often includes surrounding double quotes (e.g. 'C:\path\generated'). These quotes cause the backend to fail with 'The filename, directory name, or volume label syntax is incorrect'.

Consolidate quote-stripping into fsutil.StripPathQuotes (Go) and TextUtils.stripPathQuotes (TS) instead of duplicating inline logic across resolvers and components.

Testing:

  • Go to Library, click on "add directory"
  • Paste a directory with quotes, e.g "C:\path\generated"
  • It strips quotes and accepts

slick-daddy avatar May 20 '26 01:05 slick-daddy

Please include what testing you've performed in the description.

WithoutPants avatar May 20 '26 01:05 WithoutPants

Done.

slick-daddy avatar May 20 '26 01:05 slick-daddy

I'm not convinced that the UI changes are good. Let's just limit this to the server-side for the time being.

WithoutPants avatar Jun 26 '26 01:06 WithoutPants