mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
type fixes
This commit is contained in:
parent
e9f6d00a93
commit
7cb4e41f8a
7 changed files with 32 additions and 7 deletions
|
|
@ -316,8 +316,12 @@ class NativeShare extends AbstractShare {
|
|||
* @return mixed the attribute value
|
||||
*/
|
||||
public function setAttribute(string $path, string $attribute, $value) {
|
||||
if ($attribute === 'system.dos_attr.mode' and is_int($value)) {
|
||||
$value = '0x' . dechex($value);
|
||||
if (is_int($value)) {
|
||||
if ($attribute === 'system.dos_attr.mode') {
|
||||
$value = '0x' . dechex($value);
|
||||
} else {
|
||||
throw new \InvalidArgumentException("Invalid value for attribute");
|
||||
}
|
||||
}
|
||||
|
||||
return $this->getState()->setxattr($this->buildUrl($path), $attribute, $value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue