~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/common/studpath.py

  • Committer: mattgiuca
  • Date: 2007-12-21 03:21:27 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:120
setup.py: Added command-line argument mode for conf. This completely works!

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
    See also: conf.jail_base
48
48
    """
49
 
    # First normalise the path
50
 
    urlpath = os.path.normpath(urlpath)
51
 
    # Now if it begins with ".." or separator, then it's illegal
52
 
    if urlpath.startswith("..") or urlpath.startswith(os.sep):
53
 
        return (None, None)
54
49
    # Note: User can be a group name. There is absolutely no difference in our
55
50
    # current directory scheme.
56
51
    (user, subpath) = util.split_path(urlpath)
79
74
    >>> url_to_jailpaths("")
80
75
    (None, None, None)
81
76
    """
82
 
    # First normalise the path
83
 
    urlpath = os.path.normpath(urlpath)
84
 
    # Now if it begins with ".." then it's illegal
85
 
    if urlpath.startswith(".."):
86
 
        return (None, None, None)
87
77
    # Note: User can be a group name. There is absolutely no difference in our
88
78
    # current directory scheme.
89
79
    (user, subpath) = util.split_path(urlpath)