put comment on the sleep()

This commit is contained in:
Benjamin Sonntag 2015-11-16 08:27:56 +01:00
parent 3f8550802a
commit fbce91bb39
1 changed files with 2 additions and 2 deletions

View File

@ -567,13 +567,13 @@ class m_bro {
$m = $m & (~ 0222); // ugo-w $m = $m & (~ 0222); // ugo-w
} }
$action->chmod($absolute . "/" . $d[$i], $m); $action->chmod($absolute . "/" . $d[$i], $m);
// We'd like to *wait* for this to complete, but since this is essentially asynchronous, we can't be sure easily
// So we chose to wait a little bit (2 sec) at the end of the loop...
if ($verbose) { if ($verbose) {
echo "chmod " . sprintf('%o', $m) . " file, was " . sprintf('%o', fileperms($absolute . "/" . $d[$i])) . " -- " . $perm[$i]['w']; echo "chmod " . sprintf('%o', $m) . " file, was " . sprintf('%o', fileperms($absolute . "/" . $d[$i])) . " -- " . $perm[$i]['w'];
} }
} }
} }
// We'd like to *wait* for this to complete, but since this is essentially asynchronous, we can't be sure easily
// So we chose to wait a little bit (2 sec) at the end of the loop...
sleep(2); sleep(2);
return true; return true;
} }