modmore / Gitify

Command line toolkit to make managing a MODX site in git a lot easier.
MIT License
122 stars 55 forks source link

Fixed non english file names generation #442

Closed livingroot closed 11 months ago

livingroot commented 1 year ago

What does it do ?

replaced SplFileInfo::getBasename() calls with SplFileInfo::getFilename()

Why is it needed ?

  1. If yaml file name starts with non-english characters, gitify build removed those files.

Example:

$file = new SplFileInfo("directory/файл.txt"); // file, which contains cyrillic characters
var_dump($file->getBasename());
var_dump($file->getFilename());

output:

string(4) ".txt" // wrong
string(12) "файл.txt" // correct

Related issue: https://github.com/modmore/Gitify/issues/188

Mark-H commented 1 year ago

Thanks for the PR, we'll test this and include it on the next release. 💙

muzzwood commented 11 months ago

This appears to work without issue. Thanks for your contribution @livingroot ! 😃