Skip to content
Snippets Groups Projects
Commit 4c9f55a3 authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #17680 from owncloud/ftp-rmdir-file

handle rmdir on files for ftp storages
parents aeb4cdfb db89d1ce
No related branches found
No related tags found
No related merge requests found
......@@ -40,8 +40,11 @@ abstract class StreamWrapper extends Common {
}
public function rmdir($path) {
if ($this->file_exists($path) && $this->isDeletable($path)) {
if ($this->is_dir($path) && $this->isDeletable($path)) {
$dh = $this->opendir($path);
if (!is_resource($dh)) {
return false;
}
while (($file = readdir($dh)) !== false) {
if ($this->is_dir($path . '/' . $file)) {
$this->rmdir($path . '/' . $file);
......
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