Skip to content

Commit c9cf126

Browse files
authored
Fix getPath return double slashes in first of path
1 parent 7604a1a commit c9cf126

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Node.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public function getDirname(): string
2929

3030
public function getPath(): string
3131
{
32-
return $this->directory.'/'.$this->basename;
32+
return ($this->directory == DIRECTORY_SEPARATOR) ?
33+
$this->directory.$this->basename :
34+
$this->directory.DIRECTORY_SEPARATOR.$this->basename;
3335
}
3436

3537
/**

0 commit comments

Comments
 (0)