Permalink
Browse files

Bugfix: When moving the formats for a file, we need to do it with the…

… original permissions, otherwise we won't find the files
  • Loading branch information...
1 parent 0e3e158 commit dc6355f162847266371bbd59f35886a1f7f7350d @nmfm committed Oct 31, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 filer/models/videomodels.py
@@ -169,16 +169,16 @@ def _move_file(self):
dst_storage = self.file.storages['private']
src_fmt_storage = self.file.format_storages['public']
dst_fmt_storage = self.file.format_storages['private']
- extensions = [f['format'] for f in self.formats]
- if self.poster['filepath']:
- extensions.append('png')
-
+
# delete the thumbnail
# We are toggling the is_public to make sure that easy_thumbnails can
# delete the thumbnails
self.is_public = not self.is_public
self.file.delete_thumbnails()
- self.is_public = not self.is_public
+ extensions = [f['format'] for f in self.formats]
+ if self.poster['filepath']:
+ extensions.append('png')
+ self.is_public = not self.is_public
# This is needed because most of the remote File Storage backend do not
# open the file.
src_file = src_storage.open(src_file_name)

0 comments on commit dc6355f

Please sign in to comment.