Skip to content

Commit

Permalink
Turn backslashes into slashes on Windows (fixes Kozea#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Sep 25, 2011
1 parent add9da7 commit 160e296
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion radicale/ical.py
Expand Up @@ -196,7 +196,8 @@ def from_path(cls, path, depth="infinite", include_container=True):
"""
# 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
Expand Down

0 comments on commit 160e296

Please sign in to comment.