breaks down when there are spaces in directory names

Bug #616335 reported by Marius Gedminas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
restview
Fix Released
High
Marius Gedminas

Bug Description

To reproduce:

    mkdir -p '/tmp/testdir/dir with spaces'
    cd /tmp/testdir
    echo foo > 'dir with spaces/foo.txt'
    restview .

and then click on 'dir with spaces/foo.txt'.

I get

Traceback (most recent call last):
  File "/usr/lib/python2.6/SocketServer.py", line 281, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.6/SocketServer.py", line 307, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.6/SocketServer.py", line 320, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.6/SocketServer.py", line 615, in __init__
    self.handle()
  File "/usr/lib/python2.6/BaseHTTPServer.py", line 329, in handle
    self.handle_one_request()
  File "/usr/lib/python2.6/BaseHTTPServer.py", line 323, in handle_one_request
    method()
  File "/home/mg/py-lib/restview-1.2-py2.6.egg/restview/restviewhttp.py", line 47, in do_GET
    content = self.do_GET_or_HEAD()
  File "/home/mg/py-lib/restview-1.2-py2.6.egg/restview/restviewhttp.py", line 74, in do_GET_or_HEAD
    return self.handle_rest_file(self.translate_path())
  File "/home/mg/py-lib/restview-1.2-py2.6.egg/restview/restviewhttp.py", line 108, in handle_rest_file
    self.log_error("%s" % e)
  File "/usr/lib/python2.6/BaseHTTPServer.py", line 425, in log_error
    self.log_message(format, *args)
  File "/usr/lib/python2.6/BaseHTTPServer.py", line 447, in log_message
    format%args))
TypeError: not enough arguments for format string

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Originally reported by Chris Clark via email; he provided a patch of sorts ("I've hacked it up (literally, do not accept the changes as-is!) And it now works for me.")

Changed in restview:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Marius Gedminas (mgedmin)
Changed in restview:
status: Confirmed → Fix Committed
Changed in restview:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.