upa-url / upa

An implementation of the WHATWG URL Standard in C++
https://upa-url.github.io/docs/
Other
13 stars 0 forks source link

Remove file_path_format::detect #37

Closed rmisev closed 10 months ago

rmisev commented 10 months ago

Use file_path_format::native as default in the url_from_file_path function.

The path format detection algorithm was simple: if the first path character is /, then it is POSIX format, otherwise - Windows. But in some cases it is ambiguous, e.g. path //h\sn\p is recognized as POSIX path, but it can also be Windows UNC path, because / is allowed as directory separator in Windows paths.

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (7842b29) 99.74% compared to head (c3026b1) 99.74%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #37 +/- ## ========================================== - Coverage 99.74% 99.74% -0.01% ========================================== Files 16 16 Lines 2326 2321 -5 ========================================== - Hits 2320 2315 -5 Misses 6 6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.