Skip to content
Browse files

Merge remote-tracking branch 'origin/master'

  • Loading branch information...
2 parents 4ea491c + 5d3a3e7 commit 88729cec06c460ee27ead12c872b60bae5c9a541 @growlf growlf committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 cms_themes/models.py
View
2 cms_themes/models.py
@@ -17,7 +17,7 @@ class Theme(models.Model):
def save(self, *args, **kwargs):
if not self.id:
f = tarfile.open(fileobj=self.theme_file, mode='r:gz')
- self.name = f.getnames()[-1]
+ self.name = os.path.commonprefix(f.getnames())
f.extractall(settings.THEMES_DIR)
super(Theme, self).save(*args, **kwargs)

0 comments on commit 88729ce

Please sign in to comment.
Something went wrong with that request. Please try again.