瀏覽代碼

Moving the flags of the compiled regex to the front to fix #4137

step21 6 年之前
父節點
當前提交
47490c79be
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/borg/shellpattern.py

+ 1 - 1
src/borg/shellpattern.py

@@ -62,4 +62,4 @@ def translate(pat, match_end=r"\Z"):
         else:
             res += re.escape(c)
 
-    return res + match_end + "(?ms)"
+    return "(?ms)" + res + match_end