openzim / libzim

Reference implementation of the ZIM specification
https://download.openzim.org/release/libzim/
GNU General Public License v2.0
163 stars 47 forks source link

Rename `*Url*` symbols to `*Path*`. #869

Closed mgautierfr closed 3 months ago

mgautierfr commented 4 months ago

Dirents' "url" are not really url. They are u8 arrays which serve as the main "key". Specification says that this u8 array store a utf-8 encoded string and we use this key as a path.

Public API already use path semantic so rename all internal symbols from url to path.

Fix #868

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 46.15385% with 28 lines in your changes are missing coverage. Please review.

Project coverage is 58.01%. Comparing base (96afb38) to head (54a3e6c).

Files Patch % Lines
src/fileimpl.cpp 27.27% 2 Missing and 14 partials :warning:
src/dirent.cpp 37.50% 0 Missing and 5 partials :warning:
src/fileheader.cpp 0.00% 1 Missing and 3 partials :warning:
src/archive.cpp 0.00% 0 Missing and 1 partial :warning:
src/dirent_accessor.cpp 75.00% 0 Missing and 1 partial :warning:
src/writer/creator.cpp 50.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #869 +/- ## ======================================= Coverage 58.00% 58.01% ======================================= Files 101 101 Lines 4622 4623 +1 Branches 1925 1925 ======================================= + Hits 2681 2682 +1 Misses 667 667 Partials 1274 1274 ```

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

mgautierfr commented 3 months ago

Didn't you also have to replace all cURLy braces with PArenTHeses? :)

I've tried. But gcc didn't want. Hope next version of cpp will allow this.