From 160e296ed145e80e3ad8bfd3a32b4fa7400a2006 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sun, 25 Sep 2011 19:41:24 +0200 Subject: [PATCH] Turn backslashes into slashes on Windows (fixes #581) --- radicale/ical.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radicale/ical.py b/radicale/ical.py index ea68d75..6122460 100644 --- a/radicale/ical.py +++ b/radicale/ical.py @@ -196,7 +196,8 @@ class Calendar(object): """ # First do normpath and then strip, to prevent access to FOLDER/../ - attributes = posixpath.normpath(path).strip("/").split("/") + sane_path = posixpath.normpath(path.replace(os.sep, "/")).strip("/") + attributes = sane_path.split("/") if not attributes: return None if not (os.path.isfile(os.path.join(FOLDER, *attributes)) or