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

« back to all changes in this revision

Viewing changes to ivle/studpath.py

  • Committer: William Grant
  • Date: 2009-05-27 06:36:58 UTC
  • Revision ID: grantw@unimelb.edu.au-20090527063658-46rcvgh23qlxno87
No more ivle.conf in ivle.auth.

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
    >>> to_home_path('joe/foo/bar/baz')
113
113
    '/home/joe/foo/bar/baz'
114
114
    """
 
115
 
 
116
    urlpath = os.path.normpath(urlpath)
 
117
    # If it begins with '..', it's illegal.
 
118
    if urlpath.startswith(".."):
 
119
        return None
 
120
 
115
121
    return os.path.join('/home', urlpath)
116
122
 
117
123
def svnpublished(path):