check if a directory exists before we try to remove it

This commit is contained in:
Robin Appelman 2013-12-02 22:43:58 +01:00
parent c2e83e635d
commit 64bfcbee0a
1 changed files with 6 additions and 2 deletions

View File

@ -159,7 +159,11 @@ class View {
}
public function rmdir($path) {
if ($this->is_dir($path)) {
return $this->basicOperation('rmdir', $path, array('delete'));
} else {
return false;
}
}
public function opendir($path) {