Closed Crizz0 closed 5 years ago
If I understand the comment from the other topic you linked to correctly, I think this issue can be closed @Crizz0
We can't just use $file->getFilename()
because we actually need part of the path, the replacement is just to get rid of the beginning bit, but the final part of the directory structure is left intact.
Here's some examples I ran from the getFileList()
function:
$file->getPathname() outputs:
3.2/en/ext/phpbb/viglink/language/en/info_acp_viglink.php
3.2/en/language/en/acp/language.php
substr($file->getPathname(), strlen($dir) + 1) outputs:
ext/phpbb/viglink/language/en/info_acp_viglink.php
language/en/acp/language.php
str_replace(DIRECTORY_SEPARATOR, '/', substr($file->getPathname(), strlen($dir) + 1)) outputs:
ext/phpbb/viglink/language/en/info_acp_viglink.php
language/en/acp/language.php
https://github.com/phpbb/phpbb-translation-validator/pull/40#discussion_r140761036