set to no limit if limit = 0

This commit is contained in:
Jean-Christian Denis 2022-12-26 21:14:13 +01:00
parent 54618a5fea
commit 44644da749
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -357,6 +357,10 @@ class dcTranslater extends dcTranslaterDefaultSettings
*/
public static function isBackupLimit(string $id, string $root, int $limit = 10, bool $throw = false): bool
{
if (!$limit) {
return false;
}
$count = 0;
foreach (self::scandir($root) as $file) {
if (!is_dir($root . '/' . $file)