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

« back to all changes in this revision

Viewing changes to src/common/studpath.py

  • Committer: mattgiuca
  • Date: 2007-12-14 03:36:02 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:56
common/studpath.py: Changed translation scheme to the directory scheme
    discussed today (Andrew Peel, Tom Conway and myself).

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
    See also: conf.student_dir
48
48
    """
 
49
    # Note: User can be a group name. There is absolutely no difference in our
 
50
    # current directory scheme.
49
51
    (user, subpath) = util.split_path(urlpath)
50
52
    if user is None: return (None, None)
51
53
 
52
 
    # Note: For now this just re-joins user and subpath
53
 
    # But we plan to muddle this around a bit so it's good that they are
54
 
    # separated.
55
 
    path = os.path.join(conf.student_dir, user, subpath)
 
54
    # Join the user onto 'home' then the full path specified.
 
55
    # This results in the user's name being repeated twice, which is in
 
56
    # accordance with our directory scheme.
 
57
    # (The first time is the name of the jail, the second is the user's home
 
58
    # directory within the jail).
 
59
    path = os.path.join(conf.student_dir, user, 'home', urlpath)
56
60
 
57
61
    return (user, path)