mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
[VD:LocalFileSystem] fix #1003 support root path '/'
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user