Message71521
| Author |
vstinner |
| Recipients |
vstinner |
| Date |
2008年08月20日.09:00:57 |
| SpamBayes Score |
2.2761842e-05 |
| Marked as misclassified |
No |
| Message-id |
<1219222858.65.0.105309255151.issue3616@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
If the directory contains invalid filenames (invalid in the system
charset), an exception is raised by os.path.join() used by
shutil.rmtree():
fullname = os.path.join(path, name)
File "/home/haypo/prog/py3k/Lib/posixpath.py", line 64, in join
if b.startswith('/'):
TypeError: expected an object with the buffer interface
name is an bytes object, not a str object. My system charset is utf-8.
Example to reproduce the problem:
mkdir x
# create a file with an invalid name
touch -- $(echo -e 'x/--0250円--')
python -c "import shutils; shutil.rmtree('x')"
=> TypeError: expected an object with the buffer interface |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2008年08月20日 09:00:58 | vstinner | set | recipients:
+ vstinner |
| 2008年08月20日 09:00:58 | vstinner | set | messageid: <1219222858.65.0.105309255151.issue3616@psf.upfronthosting.co.za> |
| 2008年08月20日 09:00:58 | vstinner | link | issue3616 messages |
| 2008年08月20日 09:00:57 | vstinner | create |
|