mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
properly handle libsmbclient versions that return unix modes when we request a dos mode
This commit is contained in:
parent
927e330901
commit
cb9c9c602d
1 changed files with 3 additions and 3 deletions
|
|
@ -64,7 +64,7 @@ class NativeFileInfo implements IFileInfo {
|
||||||
$rawAttributes = explode(',', $this->share->getAttribute($this->path, 'system.dos_attr.*'));
|
$rawAttributes = explode(',', $this->share->getAttribute($this->path, 'system.dos_attr.*'));
|
||||||
$this->attributeCache = [];
|
$this->attributeCache = [];
|
||||||
foreach ($rawAttributes as $rawAttribute) {
|
foreach ($rawAttributes as $rawAttribute) {
|
||||||
[$name, $value] = explode(':', $rawAttribute);
|
list($name, $value) = explode(':', $rawAttribute);
|
||||||
$name = strtolower($name);
|
$name = strtolower($name);
|
||||||
if ($name == 'mode') {
|
if ($name == 'mode') {
|
||||||
$this->attributeCache[$name] = (int)hexdec(substr($value, 2));
|
$this->attributeCache[$name] = (int)hexdec(substr($value, 2));
|
||||||
|
|
@ -179,8 +179,8 @@ class NativeFileInfo implements IFileInfo {
|
||||||
$attribute = $this->share->getAttribute($this->path, 'system.nt_sec_desc.acl.*+');
|
$attribute = $this->share->getAttribute($this->path, 'system.nt_sec_desc.acl.*+');
|
||||||
|
|
||||||
foreach (explode(',', $attribute) as $acl) {
|
foreach (explode(',', $attribute) as $acl) {
|
||||||
[$user, $permissions] = explode(':', $acl, 2);
|
list($user, $permissions) = explode(':', $acl, 2);
|
||||||
[$type, $flags, $mask] = explode('/', $permissions);
|
list($type, $flags, $mask) = explode('/', $permissions);
|
||||||
$mask = hexdec($mask);
|
$mask = hexdec($mask);
|
||||||
|
|
||||||
$acls[$user] = new ACL($type, $flags, $mask);
|
$acls[$user] = new ACL($type, $flags, $mask);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue