Fix path normalization (broke paths containing '+' characters).

This commit is contained in:
Lars Jung 2014-06-25 02:47:46 +02:00
parent f56a67af9e
commit 61301b3f98

View file

@ -2,7 +2,7 @@
function normalize_path($path, $trailing_slash = false) {
$path = preg_replace("#\\+|/+#", "/", $path);
$path = preg_replace("#\\\\+|/+#", "/", $path);
return preg_match("#^(\w:)?/$#", $path) ? $path : (rtrim($path, "/") . ($trailing_slash ? "/" : ""));
}