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
2 files
+ 19
16
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -106,10 +106,13 @@ final class CollectPathsToExcludeEvent extends StageEvent implements PathListInt
@@ -106,10 +106,13 @@ final class CollectPathsToExcludeEvent extends StageEvent implements PathListInt
// so that they're totally unambiguous. A path like
// so that they're totally unambiguous. A path like
// `/path/to/project/file.php` should become `/file.php`.
// `/path/to/project/file.php` should become `/file.php`.
$flag = TRUE;
$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;
$flag = FALSE;
}
}
$path = str_replace($project_root, '', $path);
$path = str_replace($project_root, '', $path);
 
$path = ltrim($path, '/');
if ($flag) {
if ($flag) {
if ($path[0] == '/') {
if ($path[0] == '/') {
$path = '.' . $path;
$path = '.' . $path;
Loading