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

« back to all changes in this revision

Viewing changes to lib/fileservice_lib/listing.py

  • Committer: drtomc
  • Date: 2008-02-08 04:30:55 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:436
fileservice: Make things less broken than they were. No claims of perfection yet! Unpacking form data with cgi.py is AWFUL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
    req.path. Sets the HTTP response code in req, writes additional headers,
132
132
    and writes the HTTP response, if any."""
133
133
 
134
 
    (user, path) = studpath.url_to_local(req.path)
 
134
    (user, jail, path) = studpath.url_to_jailpaths(req.path)
135
135
 
136
 
    print req.path, user, path
137
136
    # FIXME: What to do about req.path == ""?
138
137
    # Currently goes to 403 Forbidden.
139
138
    if path is None:
199
198
    # The other object is the clipboard, if present in the browser session.
200
199
    # This can go straight from the session to JSON.
201
200
    session = req.get_session()
202
 
    try:
 
201
    if session and 'clipboard' in session:
 
202
        # In CGI mode, we can't get our hands on the
 
203
        # session (for the moment), so just leave it out.
203
204
        listing['clipboard'] = session['clipboard']
204
 
    except KeyError:
205
 
        pass
206
205
    
207
206
    return listing
208
207