Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 66a36d2

Browse files
committed
Fix SMB issue when trying to delete folder with a file named '0' in it
1 parent 0266e1f commit 66a36d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/plugins/core.access/class.AbstractAccessDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ protected function dircopy($srcdir, $dstdir, &$errors, &$success, $verbose = fal
350350
umask($old);
351351
}
352352
if ($curdir = opendir($srcdir)) {
353-
while ($file = readdir($curdir)) {
353+
while (($file = readdir($curdir)) !== FALSE) {
354354
if ($file != '.' && $file != '..') {
355355
$srcfile = $srcdir . "/" . $file;
356356
$dstfile = $dstdir . "/" . $file;
@@ -406,7 +406,7 @@ protected function deldir($location, $repoData)
406406
if (is_dir($location)) {
407407
AJXP_Controller::applyHook("node.before_path_change", array(new AJXP_Node($location)));
408408
$all=opendir($location);
409-
while ($file=readdir($all)) {
409+
while (($file=readdir($all)) !== FALSE) {
410410
if (is_dir("$location/$file") && $file !=".." && $file!=".") {
411411
$this->deldir("$location/$file", $repoData);
412412
if (file_exists("$location/$file")) {

0 commit comments

Comments
 (0)