Skip to content

Commit 47999e0

Browse files
committed
Do not use FileInfo to try to find files that might actually be gone when looking them up in the index. This fixes issue #149
1 parent cbec201 commit 47999e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/collector/project/IndexCollection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ public function addTrait(TraitObject $trait) {
120120
* @return \DOMNodeList
121121
*/
122122
public function findUnitNodesBySrcFile($path) {
123-
$search = new FileInfo($path);
124-
return $this->getRootElement()->query(sprintf('//*[@src="%s"]', $search->getRelative($this->srcDir)));
123+
$src = substr($path, strlen($this->srcDir) + 1);
124+
return $this->getRootElement()->query(sprintf('//*[@src="%s"]', $src));
125125
}
126126

127127
/**

0 commit comments

Comments
 (0)