Permalink
Browse files

Fix SMB issue when trying to delete folder with a file named '0' in it

  • Loading branch information...
1 parent 47331a1 commit 85665c4dc7a88e92f6fe5b56548ad9f48d831f69 @ghecquet ghecquet committed Jun 1, 2016
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/src/plugins/core.access/src/AbstractAccessDriver.php
@@ -393,7 +393,7 @@ protected function dircopy($srcdir, $dstdir, &$errors, &$success, $verbose = fal
umask($old);
}
if ($curdir = opendir($srcdir)) {
- while ($file = readdir($curdir)) {
+ while (($file = readdir($curdir)) !== FALSE) {
if ($file != '.' && $file != '..') {
$srcfile = $srcdir . "/" . $file;
$dstfile = $dstdir . "/" . $file;
@@ -457,7 +457,7 @@ protected function deldir($location, $repoData)
if (is_dir($location)) {
\Pydio\Core\Controller\Controller::applyHook("node.before_path_change", array(new AJXP_Node($location)));
$all=opendir($location);
- while ($file=readdir($all)) {
+ while (($file=readdir($all)) !== FALSE) {
if (is_dir("$location/$file") && $file !=".." && $file!=".") {
$this->deldir("$location/$file", $repoData);
if (file_exists("$location/$file")) {

0 comments on commit 85665c4

Please sign in to comment.