mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
[VD] use elFinder::splitFileExtention()
This commit is contained in:
@@ -1049,10 +1049,8 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
|
||||
// for several files - create new directory
|
||||
// create unique name for directory
|
||||
$src = $dir;
|
||||
$name = basename($path);
|
||||
if (preg_match('/\.((tar\.(gz|bz|bz2|z|lzo))|cpio\.gz|ps\.gz|xcf\.(gz|bz2)|[a-z0-9]{1,4})$/i', $name, $m)) {
|
||||
$name = substr($name, 0, strlen($name)-strlen($m[0]));
|
||||
}
|
||||
$splits = elFinder::splitFileExtention(basename($path));
|
||||
$name = $splits[0];
|
||||
$test = dirname($path).DIRECTORY_SEPARATOR.$name;
|
||||
if (file_exists($test) || is_link($test)) {
|
||||
$name = $this->uniqueName(dirname($path), $name, '-', false);
|
||||
|
||||
Reference in New Issue
Block a user