Skip to content

Commit

Permalink
Merge pull request haiwen#1495 from haiwen/move-dir
Browse files Browse the repository at this point in the history
fix bug when move dir
  • Loading branch information
xiez authored Feb 21, 2017
2 parents f9d0867 + 616b80d commit 78a1384
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions seahub/api2/endpoints/copy_move_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ def post(self, request):
username = request.user.username
if operation == 'move':
if dirent_type == 'dir' and src_repo_id == dst_repo_id and \
dst_parent_dir.startswith(src_parent_dir + '/'):
dst_parent_dir.startswith(src_dirent_path + '/'):

error_msg = _(u'Can not move directory %(src)s to its subdirectory %(des)s') \
% {'src': escape(src_parent_dir), 'des': escape( dst_parent_dir)}
% {'src': escape(src_dirent_path), 'des': escape(dst_parent_dir)}
return api_error(status.HTTP_400_BAD_REQUEST, error_msg)

# permission check for src parent dir
Expand Down

0 comments on commit 78a1384

Please sign in to comment.