handle empty names in isHidden
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
a0771a389a
commit
56a66c45ce
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue