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

« back to all changes in this revision

Viewing changes to scripts/interpretservice

  • Committer: dcoles
  • Date: 2008-07-27 15:22:45 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:962
Serve: Fix the working directory used by interpretservice so that paths are 
reletive to the users home directory (rather than 
/opt/ivle/scriptsopt/ivle/scripts). (Fixes regression in new serve method)

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
url = urlparse.urlparse(req.path)
41
41
querystr = url[4]
42
42
urlpath = url[2]
43
 
filename = studpath.url_to_jailpaths(urlpath)[2]
 
43
username, _, filename = studpath.url_to_jailpaths(urlpath)
44
44
 
45
45
python = "/usr/bin/python"
46
46
 
 
47
# Everything should be done from the home directory
 
48
os.chdir(os.path.join('/home', username))
 
49
 
47
50
if filename is None:
48
51
    req.throw_error(req.HTTP_NOT_FOUND, "The path specified is invalid.")
49
52
elif not os.access(filename, os.R_OK):