Skip to content

Commit aece59f

Browse files
authored
fixing upload checks (#485)
* fixing upload checks * version bump
1 parent beefd13 commit aece59f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Diff for: _build/gpm.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"lowCaseName": "fred",
44
"description": "Frontend Editor",
55
"author": "John Peca",
6-
"version": "2.1.0-pl",
6+
"version": "2.1.1-pl",
77
"menus": [
88
{
99
"text": "fred.menu.fred",

Diff for: core/components/fred/src/Endpoint/ElFinder/Driver/Driver.php

+10
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,16 @@ protected function _stat($path)
349349
return $stat;
350350
}
351351

352+
try {
353+
$file = $this->fs->fileExists($path);
354+
$mimeType = $this->fs->mimeType($path);
355+
356+
if (!$file && $mimeType !== 'directory') {
357+
return [];
358+
}
359+
} catch (FilesystemException $e) {
360+
return [];
361+
}
352362

353363
$name = explode(DIRECTORY_SEPARATOR, $path);
354364
$stat['name'] = array_pop($name);

0 commit comments

Comments
 (0)