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 #438

Closed livingroot closed 1 year 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