Alexandre Julliard : transl: Fix the resfile filtering regexps.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Nov 17 00:09:00 CST 2015


Module: tools
Branch: master
Commit: 13946a57c5b7b4d24860ef985bb7373fb5d26504
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=13946a57c5b7b4d24860ef985bb7373fb5d26504

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Nov 17 14:14:46 2015 +0900

transl: Fix the resfile filtering regexps.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 transl/lib.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/transl/lib.php b/transl/lib.php
index 0e6c5e7..2300a59 100644
--- a/transl/lib.php
+++ b/transl/lib.php
@@ -93,7 +93,7 @@ function validate_type($type)
 
 function validate_resfile($resfile)
 {
-    if (!preg_match("*^[a-zA-Z0-9/.-_]+(#locale[0-9a-f]{3}:[0-9a-f]{2})?$*", $resfile))
+    if (!preg_match("*^[-_a-zA-Z0-9/.]+(#locale[0-9a-f]{3}:[0-9a-f]{2})?$*", $resfile))
         die("Invalid resource file");
     return $resfile;
 }
@@ -179,7 +179,7 @@ function get_res_path($resfile)
 
 function get_resfile_name($resfile)
 {
-    if (preg_match("*^([a-zA-Z0-9/.-_]+)#locale([0-9a-f]{3}:[0-9a-f]{2})$*", $resfile, $m))
+    if (preg_match("*^([-_a-zA-Z0-9/.]+)#locale([0-9a-f]{3}:[0-9a-f]{2})$*", $resfile, $m))
     {
         return "Locale data for: ".get_locale_name($m[2])." (".$m[1].")";
     }




More information about the wine-cvs mailing list