Seadrive Client + Move Folder = :-(

Hey everyone!

Long time Seafile admin, first time poster :wink:

In the past I’ve never used the Seadrive but the Seafile Client. Due to a new customer who had lots of data to migrate I needed to implement Seadrive to make sure that every employee had access to all the data.

I’ve recently run in the a curious issue:
The customer told me that they were having issues while moving data.

Long story, short:
1.) I always get this error in the seahub-logfiles on the server when I do a move-operation:
[WARNING] django.request:222 log_response Bad Request: /api/v2.1/copy-move-task/
[WARNING] django.request:222 log_response Not Found: /api/v2.1/copy-move-task/

2.) if the source- and the destination path has a “&” in it I’ll get the following issue in seahub.log:

[ERROR] django.request:222 log_response Internal Server Error: /api2/repos/accc1378-d3f8-4eab-b484-5c85657b43b6/file/
Traceback (most recent call last):
  File "/srv/seafile-server-8.0.8/seahub/thirdpart/django/core/handlers/", line 34, in inner
    response = get_response(request)
  File "/srv/seafile-server-8.0.8/seahub/thirdpart/django/core/handlers/", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/srv/seafile-server-8.0.8/seahub/thirdpart/django/core/handlers/", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/srv/seafile-server-8.0.8/seahub/thirdpart/django/views/decorators/", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/srv/seafile-server-8.0.8/seahub/thirdpart/django/views/generic/", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/srv/seafile-server-8.0.8/seahub/seahub/api2/", line 23, in dispatch
    response = super(APIView, self).dispatch(*a, **kw)
  File "/srv/seafile-server-8.0.8/seahub/thirdpart/rest_framework/", line 505, in dispatch
    response = self.handle_exception(exc)
  File "/srv/seafile-server-8.0.8/seahub/seahub/api2/", line 20, in handle_exception
    return super(APIView, self).handle_exception(exc)
  File "/srv/seafile-server-8.0.8/seahub/thirdpart/rest_framework/", line 465, in handle_exception
  File "/srv/seafile-server-8.0.8/seahub/thirdpart/rest_framework/", line 476, in raise_uncaught_exception
    raise exc
  File "/srv/seafile-server-8.0.8/seahub/thirdpart/rest_framework/", line 502, in dispatch
    response = handler(request, *args, **kwargs)
  File "/srv/seafile-server-8.0.8/seahub/seahub/api2/", line 2942, in post
    new_filename = check_filename_with_rename(dst_repo_id, dst_dir, filename)
  File "/srv/seafile-server-8.0.8/seahub/seahub/utils/", line 339, in check_filename_with_rename
    exist_obj_names = [dirent.obj_name for dirent in dirents]
TypeError: 'NoneType' object is not iterable

seafile.log says the following:

…/common/rpc-service.c(969): Can’t find seaf dir for /999 TES/ in repo 341f3b73-0388-4026-971d-5d4dfb57d06b

The folder in my testing setup was named “999 TES&TFOLDER”. The folder where the problem originated was name after a company, think like “AT&T”

The issue only occured when I tried to MOVE a folder which had a “&” in it. Moving single or multiple files did work as excepected.

SeaDrive Version: 2.20
Seafile-Server Version: 8.0.8

We’ll look into the problem.

1 Like

Issue with same Seafile-Server 8.0.8 and Seadrive 2.0.21 still exists.
I’ll be installing the most recent Seafile Server on a test machine to see if the issue exists with Server 9.0.4

We cannot reproduce the issue locally. But I think it has something to do with the API client uses to move files. In 2.0.22 we’ll update to use new API. You can then test whether it works.