Second preg_match in auditfilesNotInDatabaseIncludeFile can have double slashes, breaking regex

Created on 24 July 2023, over 1 year ago

Problem/Motivation

I was debugging why some of my directories weren't being excluded, !preg_match('@' . $exclusions . '@', $path . DIRECTORY_SEPARATOR . $file) was not matching these directories.

It's because $path already has a DIRECTORY_SEPARATOR added to it in auditfilesNotInDatabaseGetFiles, this means if $path is empty it'll end up regexing on /path/to/filesystem//directory.

🐛 Bug report
Status

Fixed

Version

4.1

Component

Code

Created by

🇦🇺Australia acbramley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024