Turn backslashes into slashes on Windows (fixes #581)
This commit is contained in:
		@@ -196,7 +196,8 @@ class Calendar(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        # First do normpath and then strip, to prevent access to FOLDER/../
 | 
					        # 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:
 | 
					        if not attributes:
 | 
				
			||||||
            return None
 | 
					            return None
 | 
				
			||||||
        if not (os.path.isfile(os.path.join(FOLDER, *attributes)) or
 | 
					        if not (os.path.isfile(os.path.join(FOLDER, *attributes)) or
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user