mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Move decoding the attribute string to the place it belongs
This commit is contained in:
parent
5b5905e494
commit
d5106ac0a8
2 changed files with 3 additions and 5 deletions
|
|
@ -101,7 +101,9 @@ class NativeFileInfo implements IFileInfo {
|
||||||
*/
|
*/
|
||||||
protected function getMode() {
|
protected function getMode() {
|
||||||
if (!$this->modeCache) {
|
if (!$this->modeCache) {
|
||||||
$this->modeCache = $this->share->getAttribute($this->path, 'system.dos_attr.mode');
|
$attribute = $this->share->getAttribute($this->path, 'system.dos_attr.mode');
|
||||||
|
// parse hex string
|
||||||
|
$this->modeCache = hexdec(substr($attribute, 2));
|
||||||
}
|
}
|
||||||
return $this->modeCache;
|
return $this->modeCache;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -248,10 +248,6 @@ class NativeShare implements IShare {
|
||||||
$this->connect();
|
$this->connect();
|
||||||
|
|
||||||
$result = $this->state->getxattr($this->buildUrl($path), $attribute);
|
$result = $this->state->getxattr($this->buildUrl($path), $attribute);
|
||||||
// parse hex string
|
|
||||||
if ($attribute === 'system.dos_attr.mode') {
|
|
||||||
$result = hexdec(substr($result, 2));
|
|
||||||
}
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue