Skip to content
Snippets Groups Projects

Issue #3365151: CollectPathsToExcludeEvent needs to exclude paths relative to the project root prefixed with './' so they are not ambiguous to rsync

Merged Issue #3365151: CollectPathsToExcludeEvent needs to exclude paths relative to the project root prefixed with './' so they are not ambiguous to rsync
Files
2
@@ -106,10 +106,13 @@ final class CollectPathsToExcludeEvent extends StageEvent implements PathListInt
// so that they're totally unambiguous. A path like
// `/path/to/project/file.php` should become `/file.php`.
$flag = TRUE;
if (is_file($path)) {
// Adding is_dir because database file were not being recognised using
// is_file.
if (is_file($path) || !is_dir($path)) {
$flag = FALSE;
}
$path = str_replace($project_root, '', $path);
$path = ltrim($path, '/');
if ($flag) {
if ($path[0] == '/') {
$path = '.' . $path;
Loading