Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of git://github.com/ff0000/django-filebrowser

  • Loading branch information...
commit 50e06fab43740ef2e0c804f9f48226b89bf79303 2 parents eb2fbc9 + aa4d1e9
@dji dji authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 filebrowser/views.py
View
4 filebrowser/views.py
@@ -440,6 +440,8 @@ def rename(request):
try:
# PRE RENAME SIGNAL
filebrowser_pre_rename.send(sender=request, path=path, filename=filename, new_filename=new_filename)
+ # RENAME ORIGINAL
+ os.rename(safe_join(MEDIA_ROOT, relative_server_path), safe_join(MEDIA_ROOT, new_relative_server_path))
# DELETE IMAGE VERSIONS/THUMBNAILS
# regenerating versions/thumbs will be done automatically
for version in VERSIONS:
@@ -449,8 +451,6 @@ def rename(request):
pass
if PRERENDER_VERSIONS:
version_generator(new_relative_server_path, version)
- # RENAME ORIGINAL
- os.rename(safe_join(MEDIA_ROOT, relative_server_path), safe_join(MEDIA_ROOT, new_relative_server_path))
# POST RENAME SIGNAL
filebrowser_post_rename.send(sender=request, path=path, filename=filename, new_filename=new_filename)
# MESSAGE & REDIRECT
Please sign in to comment.
Something went wrong with that request. Please try again.