mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
fix setMode normal
This commit is contained in:
parent
239a6ea3c8
commit
96b16502e4
1 changed files with 11 additions and 6 deletions
|
|
@ -132,7 +132,7 @@ class Share extends AbstractShare {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @return \Icewind\SMB\IFileInfo[]
|
* @return \Icewind\SMB\IFileInfo
|
||||||
*/
|
*/
|
||||||
public function stat($path) {
|
public function stat($path) {
|
||||||
$escapedPath = $this->escapePath($path);
|
$escapedPath = $this->escapePath($path);
|
||||||
|
|
@ -334,10 +334,14 @@ class Share extends AbstractShare {
|
||||||
$output = $this->execute($cmd);
|
$output = $this->execute($cmd);
|
||||||
$this->parseOutput($output, $path);
|
$this->parseOutput($output, $path);
|
||||||
|
|
||||||
|
if ($mode !== FileInfo::MODE_NORMAL) {
|
||||||
// then set the modes we want
|
// then set the modes we want
|
||||||
$cmd = 'setmode ' . $path . ' ' . $modeString;
|
$cmd = 'setmode ' . $path . ' ' . $modeString;
|
||||||
$output = $this->execute($cmd);
|
$output = $this->execute($cmd);
|
||||||
return $this->parseOutput($output, $path);
|
return $this->parseOutput($output, $path);
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -385,7 +389,8 @@ class Share extends AbstractShare {
|
||||||
if (count($lines) === 0) {
|
if (count($lines) === 0) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return $this->parser->checkForError($lines, $path);
|
$this->parser->checkForError($lines, $path);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue