Closed esdu closed 12 years ago
Hello @carnival,
Does adding this one line before line 194 fix your issue?
else:
_path[0] = _path[0].replace('/', '-') # new
path = '/'.join(map(lambda x: x.replace('/', '\/'), _path))
self.download_file(root['name'], root['url'], path)
This isn't a proper fix for your problem but I'm trying to narrow it down here.
Let me know
Hey KartikTalwar, sure, that fixes it. I agree we should replace the /
with something, and I think what you have is good enough of a fix. Just curious, is replacing /
with -
a convention?
Well... sort of/not really. Just one of the commonly used separator. Could have gone with a comma too but you rarely see folder names that include commas. A period or a space would have worked as well.
I have a class named "AFM 131/ARBUS 101", the forward slash is being replaced here, which results in a folder named
AFM 131\
being created, inside that isARBUS 101 - Fall 2012
, and inside that are all the files.I'm not sure what's a good way to deal with this. I don't think it's possible to create a folder with a / in the name in unix. Maybe
x.replace('/', ', ')
?