Skip to content
Snippets Groups Projects
Commit 8ab70b12 authored by Robin Appelman's avatar Robin Appelman
Browse files

properly use smb permissions

parent 86581f66
No related branches found
No related tags found
No related merge requests found
...@@ -349,6 +349,28 @@ class SMB extends Common { ...@@ -349,6 +349,28 @@ class SMB extends Common {
} }
} }
public function isReadable($path) {
try {
$info = $this->getFileInfo($path);
return !$info->isHidden();
} catch (NotFoundException $e) {
return false;
} catch (ForbiddenException $e) {
return false;
}
}
public function isUpdatable($path) {
try {
$info = $this->getFileInfo($path);
return !$info->isHidden() && !$info->isReadOnly();
} catch (NotFoundException $e) {
return false;
} catch (ForbiddenException $e) {
return false;
}
}
/** /**
* check if smbclient is installed * check if smbclient is installed
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment