From b361c1618168533bf38d2b8d303e301446d6b112 Mon Sep 17 00:00:00 2001 From: Patrick McAndrew Date: Tue, 11 Feb 2014 17:38:31 +0000 Subject: [PATCH] not sure why variable names were lost - perhaps this isn't the correct thing to do, but rename current isn't working --- seahub/api2/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/seahub/api2/views.py b/seahub/api2/views.py index b651458ddb..37b8d2b782 100644 --- a/seahub/api2/views.py +++ b/seahub/api2/views.py @@ -1171,12 +1171,14 @@ class FileView(APIView): return api_error(status.HTTP_400_BAD_REQUEST, 'Newname too long') parent_dir = os.path.dirname(path) + parent_dir_utf8 = parent_dir.encode('utf-8') oldname = os.path.basename(path) if oldname == newname: return api_error(status.HTTP_409_CONFLICT, 'The new name is the same to the old') newname = check_filename_with_rename(repo_id, parent_dir, newname) + newname_utf8 = newname.encode('utf-8') try: seafile_api.rename_file (repo_id, parent_dir, oldname, newname,