Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SVCS-294] Add rename validation #213

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
Merge branch 'develop' into drop-box-slash-issue
  • Loading branch information
Johnetordoff committed Oct 16, 2017
commit 420c66d63a7ce7945904dd1da92286847dd55a31
6 changes: 6 additions & 0 deletions waterbutler/server/api/v1/provider/movecopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ async def move_or_copy(self):
if 'path' not in self.json:
raise exceptions.InvalidParameters('Path is required for moves or copies')

if not self.json['path'].endswith('/'):
raise exceptions.InvalidParameters('Path requires a trailing slash to indicate '
'it is a folder')

action = self.json['action']

# Note: attached to self so that _send_hook has access to these
self.dest_resource = self.json.get('resource', self.resource)

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.