handle empty names in isHidden

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2020-05-27 15:30:19 +02:00
parent a0771a389a
commit 56a66c45ce
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ class NativeFileInfo implements IFileInfo {
public function isHidden() { public function isHidden() {
$mode = $this->getMode(); $mode = $this->getMode();
if ($mode > 0x80) { if ($mode > 0x80) {
return $this->name[0] === '.'; return strlen($this->name) > 0 && $this->name[0] === '.';
} else { } else {
return (bool)($mode & IFileInfo::MODE_HIDDEN); return (bool)($mode & IFileInfo::MODE_HIDDEN);
} }