Commit b9e32039 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis

Merge pull request #104 from dimara/hotfix-0.13.2

Fix download of an existing file
parents 86fcbabe fb488e4a
......@@ -1381,11 +1381,17 @@ class file_download(_PithosContainer):
self.client.MAX_THREADS = int(self['max_threads'] or 5)
progress_bar = None
try:
# From _src_dst():
# If rpath is None output_file is a directory.
# If rpath is not None output_file is a file descriptor.
for rpath, output_file in self._src_dst(local_path):
if not rpath and not path.exists(output_file):
self.error('Create local directory %s' % output_file)
makedirs(output_file)
# Create a directory
if not rpath:
if not path.exists(output_file):
self.error('Create local directory %s' % output_file)
makedirs(output_file)
continue
# Download a file
self.error('/%s/%s --> %s' % (
self.container, rpath, output_file.name))
progress_bar, download_cb = self._safe_progress_bar(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment