*/
function isdir($path)
{
- $output = @$this->registry->svn->cat($this->registry->paths->fetch_repos($path), $this->registry->paths->fetch_path($path), 'HEAD');
- $output = implode("\n", $output);
- if (strpos($output, 'svn:') === false)
- {
- return false;
- }
- else
+ $output = $this->registry->svn->std('info', $this->registry->paths->fetch_repos($path), $this->registry->paths->fetch_path($path), 'HEAD');
+
+ foreach ($output AS $line)
{
- return true;
+ if (preg_match('#^Node Kind: (.*)#', $line, $matches))
+ {
+ if (trim(strtolower($matches[1])) == 'directory')
+ {
+ return true;
+ }
+ }
}
+
+ return false;
}
/**