1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-01 15:36:37 +00:00

Fix the inability to move files with special characters (#656)

* Fix the inability to move files with special characters

* Check json file list

* Don't need to check json list

* Set SEAF_ERR_BAD_ARGS when args is wrong

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks
2024-05-06 17:55:04 +08:00
committed by GitHub
parent b9e98c2b5e
commit 4ca723d183
2 changed files with 13 additions and 206 deletions

View File

@@ -295,15 +295,14 @@ class SeafileAPI(object):
filename, username, head_id)
'''
If you want to delete multiple files in a batch, @filename should be in
the following format: 'filename1\tfilename2\tfilename3'
If you want to delete multiple files in a batch, @filename should be json array
'''
def del_file(self, repo_id, parent_dir, filename, username):
return seafserv_threaded_rpc.del_file(repo_id, parent_dir, filename, username)
'''
If you want to move or copy multiple files in a batch, @src_filename and @dst_filename
should be in the following format: 'filename1\tfilename2\tfilename3',make sure the number of files
should be json array, make sure the number of files
in @src_filename and @dst_filename parameters match
'''
def copy_file(self, src_repo, src_dir, src_filename, dst_repo,