Skip to content

Commit

Permalink
Always list files in containers
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarPersson committed Jun 22, 2017
1 parent 05b5105 commit d68e3ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ESSArch_Core/ip/models.py
Expand Up @@ -419,7 +419,7 @@ def files(self, path=''):
if path.startswith(os.path.basename(container)):
fullpath = os.path.join(os.path.dirname(container), path)

if tarfile.is_tarfile(container) and os.path.getsize(container) <= MAX_FILE_SIZE:
if tarfile.is_tarfile(container):
with tarfile.open(container) as tar:
if fullpath == container:
entries = []
Expand Down Expand Up @@ -452,7 +452,7 @@ def files(self, path=''):
except KeyError:
raise exceptions.NotFound

elif zipfile.is_zipfile(container) and os.path.getsize(container) <= MAX_FILE_SIZE:
elif zipfile.is_zipfile(container):
with zipfile.ZipFile(container) as zipf:
if fullpath == container:
entries = []
Expand Down

0 comments on commit d68e3ef

Please sign in to comment.