fixing rmdir in \OC\Files\Storage\AmazonS3

This commit is contained in:
Christian Berendt 2013-07-03 18:33:15 +02:00
parent 0a5e18335e
commit 839ab7f2e6

View file

@ -148,14 +148,14 @@ class AmazonS3 extends \OC\Files\Storage\Common {
$dh = $this->opendir($path);
while ($file = readdir($dh)) {
if ($file == '.' || $file != '..') {
if ($file == '.' || $file == '..') {
continue;
}
if ($this->is_dir(stripcslashes($file))) {
$this->rmdir(stripcslashes($file));
if ($this->is_dir($path . '/' . $file)) {
$this->rmdir($path . '/' . $file);
} else {
$this->unlink(stripcslashes($file));
$this->unlink($path . '/' . $file);
}
}