}
$dh = $this->opendir($path);
- while ($file = readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if (\OC\Files\Filesystem::isIgnoredDir($file)) {
continue;
}
}
$dh = $this->opendir($source);
- while ($file = readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if (\OC\Files\Filesystem::isIgnoredDir($file)) {
continue;
}
public static function isEmpty($user) {
$view = new View('/' . $user . '/files_trashbin');
if ($view->is_dir('/files') && $dh = $view->opendir('/files')) {
- while ($file = readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if (!Filesystem::isIgnoredDir($file)) {
return false;
}
$this->remove($target);
$dir = $this->opendir($source);
$this->mkdir($target);
- while ($file = readdir($dir)) {
+ while (($file = readdir($dir)) !== false) {
if (!Filesystem::isIgnoredDir($file)) {
if (!$this->copy($source . '/' . $file, $target . '/' . $file)) {
closedir($dir);
protected function copyRecursive($source, $target) {
$dh = $this->opendir($source);
$result = true;
- while ($file = readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
if ($this->is_dir($source . '/' . $file)) {
$this->mkdir($target . '/' . $file);
$dh = $this->instance->opendir('/');
$content = [];
- while ($file = readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if ($file != '.' and $file != '..') {
$content[] = $file;
}
$dh = $this->instance->opendir('/');
$content = [];
- while ($file = readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if ($file != '.' and $file != '..') {
$content[] = $file;
}
$dh = $this->instance->opendir('/test');
$content = [];
- while ($file = readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if ($file != '.' and $file != '..') {
$content[] = $file;
}
// test that nothing outside our jail is touched
$contents = [];
$dh = $this->sourceStorage->opendir('');
- while ($file = readdir($dh)) {
+ while (($file = readdir($dh)) !== false) {
if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
$contents[] = $file;
}