[VD:LocalFileSystem] fix #1003 support root path '/'

This commit is contained in:
nao-pon
2015-04-13 17:44:37 +09:00
parent 5701c60a66
commit 5538186904
+1 -1
View File
@@ -275,7 +275,7 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
$real_path = realpath($path);
$real_parent = realpath($parent);
if ($real_path && $real_parent) {
return $real_path === $real_parent || strpos($real_path, $real_parent.DIRECTORY_SEPARATOR) === 0;
return $real_path === $real_parent || strpos($real_path, rtrim($real_parent, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR) === 0;
}
return false;
}