waterbutler icon indicating copy to clipboard operation
waterbutler copied to clipboard

[SVCS-294] Add rename validation

Open Johnetordoff opened this issue 7 years ago • 5 comments

Purpose

Currently you can rename a file or folder whatever you like, this creates a variety of error behaviors for the different providers. For Dropbox filenames with slashes create bad folders and files, for other providers the rename will just fail with no explanation, this fix alerts the user they are using an illegal character.

Changes

Add two static variables for the base provider FORBIDDEN_FILENAME_CHARS and FORBIDDEN_FOLDERNAME_CHARS which are used by validate_rename to bar the use of invalid characters.

Also cleans up some superfluous code in movecopy.py

Side Effects

None that I know of.

Tickets

https://openscience.atlassian.net/browse/SVCS-294

Johnetordoff avatar Apr 17 '17 15:04 Johnetordoff

Coverage Status

Coverage decreased (-0.09%) to 76.593% when pulling f501339f4347e426ba1dbc867059b0bc1870d456 on Johnetordoff:drop-box-slash-issue into b787a92c180697cb8fb2f5b6c402cf7b931b339d on CenterForOpenScience:develop.

coveralls avatar Aug 29 '17 18:08 coveralls

Coverage Status

Coverage decreased (-0.1%) to 88.889% when pulling 420c66d63a7ce7945904dd1da92286847dd55a31 on Johnetordoff:drop-box-slash-issue into 481c9d97cdce74a1e17cbaee9b9095976104e7e3 on CenterForOpenScience:develop.

coveralls avatar Oct 16 '17 16:10 coveralls

Coverage Status

Coverage decreased (-0.1%) to 89.798% when pulling e6edbe85b2005629b1c7ce5c2fec50829cf05ebd on Johnetordoff:drop-box-slash-issue into 26bf2093c15af333e634f14372709e7bf014ccb4 on CenterForOpenScience:develop.

coveralls avatar Nov 29 '17 22:11 coveralls

Coverage Status

Coverage decreased (-0.2%) to 89.818% when pulling 101378fbad7059d4daddaa65d2404e7a971e72da on Johnetordoff:drop-box-slash-issue into 79583070677e27c7bd13ab8536f195e9ce8041db on CenterForOpenScience:develop.

coveralls avatar Jan 16 '18 16:01 coveralls

TODO: Double check this isn't supported, and clarify pr message a little bit.

NyanHelsing avatar Aug 21 '18 15:08 NyanHelsing