Skip to content

Commit

Permalink
use DIRECTORY_SEPARATOR on determining excluded files (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
epalmans authored May 12, 2024
1 parent ee178d0 commit 1634c8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TranslationsManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getTranslations(string $locale): array
* <h3>$file is with language like <code>en/book/create.php</code> while $excludedFile contains only wildcards or path like <code>book/create.php</code></h3>
* <h3>So, we need to remove the language part from $file before comparing with $excludeFile</h3>
*/
if (fnmatch($excludeFile, str_replace($locale.'/', '', $file))) {
if (fnmatch($excludeFile, str_replace($locale.DIRECTORY_SEPARATOR, '', $file))) {
return false;
}
}
Expand Down

0 comments on commit 1634c8f

Please sign in to comment.