# HG changeset patch # User Matti Hamalainen # Date 1432975772 -10800 # Node ID 405a02586fc24a76818616a0cb09bd162778993f # Parent 1bf73b49fc91de60bd35005e99acffe9906332d7 Fix handling of image files that have spaces in filename (regexp used \S, which of course does not work for that case :P) diff -r 1bf73b49fc91 -r 405a02586fc2 mgtool.php --- a/mgtool.php Fri May 15 16:33:30 2015 +0300 +++ b/mgtool.php Sat May 30 11:49:32 2015 +0300 @@ -351,7 +351,7 @@ $entries[$dirFile] = array("type" => 1, "base" => $dirFile, "ext" => "", "mtime" => filemtime($realFile)); } else - if (preg_match("/^(\S+)(".mgGetSetting("format_exts").")$/i", $dirFile, $dirMatch)) + if (preg_match("/^([^\/]+)(".mgGetSetting("format_exts").")$/i", $dirFile, $dirMatch)) $entries[$dirFile] = array("type" => 0, "base" => $dirMatch[1], "ext" => $dirMatch[2], "mtime" => filemtime($realFile), "hide" => false); } closedir($dirHandle);