Sometimes _auditfiles_make_preg() will return the wrong path
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #2808109. -->
Reported by: [oadaeh](https://www.drupal.org/user/4649)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>In the _auditfiles_make_preg() function, when creating the paths for directories to exclude from the check, the file_build_uri() function is called. That function always returns the path to the default file scheme. If the default file scheme is different than the the file scheme chosen in the "File system path" setting on the administrative configuration page, the path to the files will be incorrect.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Re-work the _auditfiles_make_preg() function to use the path that is already retrieved elsewhere in the file.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p><del>Create and submit the patch.</del></p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>None.</p>
<h3 id="summary-api-changes">API changes</h3>
<p>The third parameter for _auditfiles_make_preg() will change from a bool to an array.</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>None.</p>
issue