On my Debian system, choosing /tmp as a target for
findfiles results in this exception trace:
File
"/usr/lib/python2.3/site-packages/PythonCardPrototype/components/button.py",
line 144, in _dispatch
component.notifyEventListeners(evt)
File
"/usr/lib/python2.3/site-packages/PythonCardPrototype/event.py",
line 334, in notifyEventListeners
listener.eventOccurred( event )
File
"/usr/lib/python2.3/site-packages/PythonCardPrototype/dispatch.py",
line 81, in eventOccurred
handler.getFunction()(self._scriptable, nativeEvent)
File
"/usr/lib/python2.3/site-packages/PythonCardPrototype/tools/findfiles/findfiles.py",
line 300, in on_btnSearch_mouseClick
self.doSearch()
File
"/usr/lib/python2.3/site-packages/PythonCardPrototype/tools/findfiles/findfiles.py",
line 245, in doSearch
for filename in util.dirwalk(dir, patterns,
self.recurse):
File
"/usr/lib/python2.3/site-packages/PythonCardPrototype/util.py",
line 114, in dirwalk
for x in dirwalk(fullpath, patterns, recurse): #
recurse into subdir
File
"/usr/lib/python2.3/site-packages/PythonCardPrototype/util.py",
line 110, in dirwalk
for f in os.listdir(dir):
OSError: [Errno 13] Permission denied: '/tmp/lost+found'
I suppose that util.py should probably just ignore
errors like this, but I haven't looked into it very
closely.
Ken Pronovici <pronovic@ieee.org>
Logged In: YES
user_id=228025
I don't know how the new os.walk() generator-based repacement for
os.path.walk() will impact this, but I was planning on using it as a
replacement for util.dirwalk. I'll look at this before releasing 0.8