Closed t-hamano closed 5 months ago
Just a thought. The plugin code doesn't use the path_join function at the moment.
Syntax such as $a. '/' . $b
or 'pattern/' . $c
is used throughout.
For consistency, would it be better to continue to use the . '/' .
syntax for this PR and decide whether to change to path_join everywhere later?
Just a thought. The plugin code doesn't use the path_join function at the moment.
Syntax such as
$a. '/' . $b
or'pattern/' . $c
is used throughout.For consistency, would it be better to continue to use the
. '/' .
syntax for this PR and decide whether to change to path_join everywhere later?
We're introducing it as a part of another PR as well https://github.com/WordPress/create-block-theme/pull/601.
There are also places where it might not be suitable to use it ie. where DIRECTORY_SEPARATOR
is in use.
I don't see a drawback in introducing it here, and also gradually whenever we need to make changes to path handling logic.
Makes sense. Many thanks.
Fixes #602
This PR fixes an issue where files are not created correctly when using certain file archivers on Windows OS.
Where the problem occurs, the file is generated by
ZipArchive::addFromString
. The PHP documentation mentions the following:I don't know the exact cause, but I think backslashes are causing problems with certain file archivers.
Testing Instructions
Screenshot