ftp2http/ftp2http.py
def validpath(self, path):
        """
        Check whether the path belongs to the user's home directory.
        Expected argument is a "real" filesystem pathname.

        Pathnames escaping from user's root directory are considered
        not valid.

        Overridden to not access the filesystem at all.

        """
        assert isinstance(path, unicode), path
        root = os.path.normpath(self.root)
        path = os.path.normpath(path)
        if not root.endswith(os.sep):
            root = root + os.sep
        if not path.endswith(os.sep):
            path = path + os.sep
        if path[0:len(root)] == root:
            return True
        return False

        Check whether the path belongs to the user's home directory.
        Expected argument is a "real" filesystem pathname.

        Pathnames escaping from user's root directory are considered
        not valid.

        Overridden to not access the filesystem at all.

        
Check whether the path belongs to the user's home directory.
Expected argument is a "real" filesystem pathname.

Pathnames escaping from user's root directory are considered
not valid.

Overridden to not access the filesystem at all.
Check whether the path belongs to the user ' s home directory . Expected argument is a " real " filesystem pathname . Pathnames escaping from user ' s root directory are considered not valid . Overridden to not access the filesystem at all .
def validpath(self, path):
        assert isinstance(path, unicode), path
        root = os.path.normpath(self.root)
        path = os.path.normpath(path)
        if not root.endswith(os.sep):
            root = root + os.sep
        if not path.endswith(os.sep):
            path = path + os.sep
        if path[0:len(root)] == root:
            return True
        return False
def validpath ( self , path ) : assert isinstance ( path , unicode ) , path root = os . path . normpath ( self . root ) path = os . path . normpath ( path ) if not root . endswith ( os . sep ) : root = root + os . sep if not path . endswith ( os . sep ) : path = path + os . sep if path [ 0 : len ( root ) ] == root : return True return False
Check whether the path belongs to the user's home directory.
Check whether the path belongs to the user ' s home directory .
"""
        Check whether the path belongs to the user's home directory.
        Expected argument is a "real" filesystem pathname.

        Pathnames escaping from user's root directory are considered
        not valid.

        Overridden to not access the filesystem at all.

        """
self
path