mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 09:14:06 +02:00
Use stat to fetch mode
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
065daa49cb
commit
26ba16309d
1 changed files with 8 additions and 3 deletions
|
|
@ -113,10 +113,15 @@ class NativeFileInfo implements IFileInfo {
|
||||||
*/
|
*/
|
||||||
protected function getMode() {
|
protected function getMode() {
|
||||||
if (!$this->modeCache) {
|
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');
|
$attribute = $this->share->getAttribute($this->path, 'system.dos_attr.mode');
|
||||||
// parse hex string
|
// parse hex string
|
||||||
$this->modeCache = (int)hexdec(substr($attribute, 2));
|
$this->modeCache = (int)hexdec(substr($attribute, 2));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $this->modeCache;
|
return $this->modeCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue