• Sandro Knauß's avatar
    Replace reModifyFile regexp with a more readable solution. (#16326) · 4e212184
    Sandro Knauß authored
    reModifyFile should make sure, that we only commit po files and non
    hidden files and that the language extension is accepted. The current
    reModifyFile was not correct, as it does not check against hidden files,
    as it doesn't took into account, that we check against a complete path and
    not just the name of the file.
    This regex successfully passed the security check, without an issue raised.
    I replaced these checks now with different tests (endswith and check for the
    first letter in the name). Those checks should be more readable and more
    verbose, what we are trying to do. Additionally those new checks should take
    less memory and CPU to pass. The any function stops executing the iterator,
    if it founds one matching element.
    4e212184