diff --git a/artefact.inc.php b/artefact.inc.php index 6e9b0fd..f143264 100644 --- a/artefact.inc.php +++ b/artefact.inc.php @@ -89,8 +89,10 @@ class TaskmanArtefact { if(!isset($this->sources_affected[$idx])) { - $file_changes = $this->task->getFileChanges(); - $sources = $file_changes != null ? $this->getChangedSources($idx) : $this->getSources($idx); + $sources = $this->task->getFileChanges() != null ? + //tries to match changed files with sources spec + $this->getChangedSources($idx) : + $this->getSources($idx); $this->sources_affected[$idx] = is_stale($this->getPath(), $sources); } @@ -131,7 +133,10 @@ class TaskmanArtefact $this->setSourcesFn($src_idx, function() use($src_spec) { $dir2files = array(); foreach($src_spec[0] as $spec_dir) + { + $spec_dir = normalize_path($spec_dir); $dir2files[$spec_dir] = scan_files([$spec_dir], $src_spec[1]); + } return new TaskmanDirFiles($dir2files); }); @@ -141,6 +146,7 @@ class TaskmanArtefact $changed = array(); foreach($src_spec[0] as $spec_dir) { + $spec_dir = normalize_path($spec_dir); $matches = $file_changes->matchDirectory($spec_dir, $src_spec[1]); $changed[$spec_dir] = $matches; }