rikyoz / bit7z

A C++ static library offering a clean and simple interface to the 7-zip shared libraries.
https://rikyoz.github.io/bit7z
Mozilla Public License 2.0
602 stars 110 forks source link

[Feature Request]: Extracting files whose names contain forbidden characters #190

Closed AndrewGsnv closed 4 months ago

AndrewGsnv commented 4 months ago

Feature description

Is it possible to somehow implement the extraction of files whose names contain characters prohibited for the Windows file system, for example ":" with their replacement by "_"? Thanks.

Additional context

No response

Code of Conduct

rikyoz commented 4 months ago

Hi! It is already implemented, but it is not enabled by default. You can enable the path sanitization of characters prohibited on Windows by building bit7z using the CMake option BIT7Z_PATH_SANITIZATION. When enabled (e.g., -DBIT7Z_PATH_SANITIZATION=ON), all invalid characters will be replaced by _, as in your example.