changeset 6:405a02586fc2

Fix handling of image files that have spaces in filename (regexp used \S, which of course does not work for that case :P)
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 30 May 2015 11:49:32 +0300
parents 1bf73b49fc91
children dec931d9e860
files mgtool.php
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);