From de695bf97fdca6ec460660afecc4cbfc6849aa30 Mon Sep 17 00:00:00 2001 From: dsb Date: Mon, 7 Nov 2016 21:38:12 +0100 Subject: [PATCH] See https://github.com/DSB/MySQLDumper/issues/11#issuecomment-258486011 --- inc/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index f4f031a..3a3db12 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -86,7 +86,7 @@ function DeleteFilesM($dir, $pattern = "*.*") if (is_dir($dir)) { $d = opendir($dir); while ($file = readdir($d)) { - if (is_file($dir . $file) && ereg("^" . $pattern . "$", $file)) { + if (is_file($dir . $file) && preg_match("/^" . $pattern . "$/", $file)) { if (unlink($dir . $file)) { $deleted[$file] = true; } else {