Skip to content

Commit

Permalink
Revert "Use stat to fetch mode"
Browse files Browse the repository at this point in the history
This reverts commit 26ba163.
  • Loading branch information
icewind1991 committed Feb 10, 2020
1 parent 7fc664a commit 444cc1c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/Native/NativeFileInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,9 @@ public function isDirectory() {
*/
protected function getMode() {
if (!$this->modeCache) {
$stat = $this->stat();
if (isset($stat['mode'])) {
$this->modeCache = ($stat['mode']);
} else {
$attribute = $this->share->getAttribute($this->path, 'system.dos_attr.mode');
// parse hex string
$this->modeCache = (int)hexdec(substr($attribute, 2));
}
$attribute = $this->share->getAttribute($this->path, 'system.dos_attr.mode');
// parse hex string
$this->modeCache = (int)hexdec(substr($attribute, 2));
}
return $this->modeCache;
}
Expand Down

0 comments on commit 444cc1c

Please sign in to comment.