1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-25 11:43:45 +00:00

another win32 bug fixed in images pipeline (regression tests already covered it)

This commit is contained in:
Pablo Hoffman 2009-10-07 22:39:19 -02:00
parent 5c68e2b34b
commit daf86144c8

View File

@ -195,7 +195,10 @@ class ImagesPipeline(MediaPipeline):
super(ImagesPipeline, self).__init__()
def _get_store(self, uri):
scheme = urlparse.urlparse(uri).scheme
if os.path.isabs(uri): # to support win32 paths like: C:\\some\dir
scheme = 'file'
else:
scheme = urlparse.urlparse(uri).scheme
store_cls = self.STORE_SCHEMES[scheme]
return store_cls(uri)