IOError when downloading a directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-swiftclient |
New
|
Undecided
|
Unassigned |
Bug Description
When trying to download a container which has a folder inside it, the client errors out with an IOError:
[akrivoka@localhost ~]$ swift -V 2 --os-username admin --os-tenant-name admin --os-password blablabla --os-auth-url http://
pf/
pf/rh pdf p
pf/rh_pdf_p.pdf
rh pic
[akrivoka@localhost ~]$ swift -V 2 --os-username admin --os-tenant-name admin --os-password blablabla --os-auth-url http://
rh pic [auth 0.442s, headers 0.517s, total 0.525s, 2.512 MB/s]
pf/rh pdf p [auth 0.412s, headers 0.461s, total 0.562s, 21.203 MB/s]
pf/rh_pdf_p.pdf [auth 0.435s, headers 0.510s, total 0.570s, 23.617 MB/s]
Traceback (most recent call last):
File "/opt/stack/
result = self.func(item, *self.args, **self.kwargs)
File "/opt/stack/
fp = open(path, 'wb')
IOError: [Errno 21] Is a directory: 'pf/'
[akrivoka@localhost ~]$
Hello Ana,
I've try to reproduce without any success. Below is the details of what I've done. Could you give us the detail to reach this
IOError ? The Swift client I use is 1.8.0.11.g04e0cb2.
fabien@ saio:/tmp/ picture$ find . saio:/tmp/ picture$ swift -A http:// 127.0.0. 1:8080/ auth/v1. 0 -U test:tester -K testing list picture saio:/tmp/ picture$ swift -A http:// 127.0.0. 1:8080/ auth/v1. 0 -U test:tester -K testing upload picture . saio:/tmp/ picture$ swift -A http:// 127.0.0. 1:8080/ auth/v1. 0 -U test:tester -K testing list picture saio:/tmp/ picture$ mkdir ../_picture saio:/tmp/ picture$ cd !$ saio:/tmp/ _picture$ swift -A http:// 127.0.0. 1:8080/ auth/v1. 0 -U test:tester -K testing download picture saio:/tmp/ _picture$
.
./rh pic
./pf
./pf/rh_pdf_p.pdf
./pf/rh pdf p
fabien@
Container 'picture' not found
fabien@
pf/rh_pdf_p.pdf
rh pic
pf/rh pdf p
fabien@
pf/rh pdf p
pf/rh_pdf_p.pdf
rh pic
fabien@
fabien@
cd ../_picture
fabien@
rh pic [headers 0.021s, total 0.022s, 0.000 MB/s]
pf/rh_pdf_p.pdf [headers 0.024s, total 0.025s, 0.000 MB/s]
pf/rh pdf p [headers 0.027s, total 0.028s, 0.000 MB/s]
fabien@
Cheers,
Fabien