}
public function rmdir($path) {
- if ($this->file_exists($path) and $this->isDeletable($path)) {
+ if ($this->file_exists($path) && $this->isDeletable($path)) {
$dh = $this->opendir($path);
while (($file = readdir($dh)) !== false) {
if ($this->is_dir($path . '/' . $file)) {
public function rmdir($path) {
$path = $this->normalizePath($path);
- if (!$this->is_dir($path) or !$this->isDeletable($path)) {
+ if (!$this->is_dir($path) || !$this->isDeletable($path)) {
return false;
}
}
public function isDeletable($path) {
- if ($path === '' or $path === '/') {
+ if ($path === '' || $path === '/') {
return false;
}
$parent = dirname($path);
- return $this->isUpdatable($parent);
+ return $this->isUpdatable($parent) and $this->isUpdatable($path);
}
public function isSharable($path) {