Files
tauri-plugins-workspace/.changes/fix-fs-url-like-paths.md
T
Lucas Fernandes Nogueira 3b19ca096c fix(fs): do not parse relative paths with a colon as URLs (#3632)
In plugins/fs/src/file_path.rs SafeFilePath::from_str, any string that
parsed as a URL with a scheme of 2+ characters was a URL, so a relative
path such as `notes:2024.txt` became a cannot-be-a-base URL and failed
with InvalidPathUrl.

Cannot-be-a-base URLs are now parsed as paths. The scheme-agnostic
url.to_file_path() stays: its result is scope checked (not a bypass).
Unit test for the parser; e2e spec writes and reads such a file (not on
Windows, where `:` is not allowed in file names).
2026-10-10 16:06:02 -03:00

286 B

fs, fs-js
fs fs-js
patch patch

Fixed relative paths whose first component contains a colon, such as notes:2024.txt, being parsed as URLs and rejected with "URL is not a valid path". Only strings with a hierarchical URL form (scheme://... or scheme:/...) are treated as URLs now.