|
|
|
|
@ -114,9 +114,12 @@ class ArchiveFilerPublic(View):
|
|
|
|
|
with zipfile.ZipFile('filer_public.zip', 'w', zipfile.ZIP_DEFLATED) as zipf:
|
|
|
|
|
for root, dirs, files in os.walk(path):
|
|
|
|
|
for file in files:
|
|
|
|
|
filePath = os.path.join(root, file)
|
|
|
|
|
try:
|
|
|
|
|
zipf.write(os.path.join(root, file), os.path.relpath(os.path.join(root, file), os.path.join(path, '..')))
|
|
|
|
|
except:
|
|
|
|
|
print(file)
|
|
|
|
|
with open(filePath) as tempFile:
|
|
|
|
|
pass
|
|
|
|
|
zipf.write(filePath, os.path.relpath(filePath, os.path.join(path, '..')))
|
|
|
|
|
except IOError:
|
|
|
|
|
print(filePath)
|
|
|
|
|
return HttpResponse('success')
|
|
|
|
|
|
|
|
|
|
|