haiwen / seafile-client

Seafile desktop client.
http://seafile.com
Apache License 2.0
471 stars 279 forks source link

Unable to create library if an older deleted library was in the parent folder #117

Closed PPaques closed 10 years ago

PPaques commented 10 years ago

Hi, Thank for your work on Seafile. I use it every day and this is my first bug in 6 months.

The problem

When you delete a library before the upload (first commit) is done, you cannot create a new library in a subfolder.

If i try to create a new library from the client :

The path "/home/pierre/Projects/rails" conflicts with an existing library

If i create the library directly on the server and try to sync with an existing directory :

Failed to add download task: Worktree conflicts existing repo

Environment :
  • Client : seafile-client 3.0.4 on Archlinux
  • Server : seafile-server 3.0.3 on a Debian Lenny server
    How to reproduce this bug :
  • Create a library with the client (In my case it was on a folder with 5Go) and stop the sync during the first upload (after the file indexing)
  • Delete this library directly on the server with the web interface
  • Try to create a library on a sub-folder of the old deleted library.
    Solution : Unknown yet

I've tried to restart the client but it isn't working. I'll look further soon.

Log file

Seafile.log

[05/21/14 15:20:34] clone-mgr.c(821): Worktree path conflict with repo Projects. [05/21/14 15:22:57] clone-mgr.c(821): Worktree path conflict with repo Projects. [05/21/14 15:25:16] clone-mgr.c(821): Worktree path conflict with repo Projects. [05/21/14 15:39:33] clone-mgr.c(821): Worktree path conflict with repo Projects.

ccnet.log

[05/21/14 15:19:57] ccnet-daemon.c(168): starting ccnet client 1.4.2 [05/21/14 15:19:57] ../common/session.c(385): Listen on 127.0.0.1 13419 [05/21/14 15:19:57] ../common/session.c(257): Update pubinfo file [05/21/14 15:19:58] ../common/session.c(365): Accepted a local client [05/21/14 15:19:58] ../common/session.c(365): Accepted a local client [05/21/14 15:19:58] ../common/session.c(365): Accepted a local client [05/21/14 15:19:58] ../common/session.c(365): Accepted a local client [05/21/14 15:19:58] ../common/session.c(365): Accepted a local client [05/21/14 15:19:58] ../common/session.c(365): Accepted a local client [05/21/14 15:19:59] ../common/processors/rcvcmd-proc.c(519): Add server a234280c - :10001 [05/21/14 15:20:07] ../common/connect-mgr.c(364): [Conn] Start outgoing connect to (null)(a23h380c1c) :10001 [05/21/14 15:20:08] ../common/connect-mgr.c(289): [Conn] Peer (null) (a23a28035c) connected

applet.log

[05/21/2014 03:19:51 PM] [Daemon Mgr] stopping ccnet/seafile daemon [05/21/2014 03:19:57 PM] starting ccnet: ("-c", "/home/pierre/.ccnet") [05/21/2014 03:19:58 PM] trying to connect to ccnet daemon... [05/21/2014 03:19:58 PM] connected to ccnet daemon [05/21/2014 03:19:58 PM] starting seaf-daemon: ("-c", "/home/pierre/.ccnet", "-d", "/home/pierre/.seafile/seafile-data", "-w", "/home/pierre/.seafile/seafile/") [05/21/2014 03:19:58 PM] seafile daemon is now running [05/21/2014 03:19:58 PM] libpng warning: iCCP: Not recognizing known sRGB profile that has been edited [05/21/2014 03:19:58 PM] switch to account **@gmail.com [05/21/2014 03:19:58 PM] libpng warning: iCCP: Not recognizing known sRGB profile that has been edited [05/21/2014 03:19:58 PM] libpng warning: iCCP: Not recognizing known sRGB profile that has been edited [05/21/2014 03:19:58 PM] [Rpc Client] connected to daemon [05/21/2014 03:19:58 PM] [MessageListener] connected to daemon [05/21/2014 03:19:58 PM] libpng warning: iCCP: Not recognizing known sRGB profile that has been edited [05/21/2014 03:19:58 PM] libpng warning: iCCP: Not recognizing known sRGB profile that has been edited [05/21/2014 03:20:04 PM] libpng warning: iCCP: Not recognizing known sRGB profile that has been edited [05/21/2014 03:20:07 PM] The latest version is 2.0.8

Thanks Pierre

PPaques commented 10 years ago

freeplant commented

You can rename the directory when the seafile client is running. The seafile client will detect that the local folder is removed and unsync the library. Then you can rename the local folder back and create a library from its sub-folder.

Not so user-friendly but it worked for me.

Thanks Pierre

mnott commented 9 years ago

That does not necessarily work. I've had to access the sqlite db files in the Seafile/.seafile-data directory (notably, repo.db), get the repo_id of the offending repository from the RepoProperty table, and then delete from all those tables that contain that repo_id. Restarting the client, I could then resynchronize the repository.

richoux commented 9 years ago

Hi @mnott. I am a total noob in database. Could you please give me the command to delete some specific repo_id values in ALL tables (in a row)? Thanks!

mnott commented 9 years ago

I'd suggest you configure sea file to use mysql:

In ccnet.conf, you set something like

[Database] ENGINE = mysql HOST = 127.0.0.1 PORT = 3306 USER = seafile PASSWD = whatever DB = ccnet-db CONNECTION_CHARSET = utf8

If I recall correctly there was even some function to migrate to mysql cleanly. You'd have to setup mysql and create the database, the user, and give him access. Then you use mysql -u seafile -p -D ccnet-db and then can do show tables; also, you can for given table use desc tablename; and then select statements to look at the content.

ellismichaelc commented 4 years ago

Why was this closed? Because there is a hacky workaround that works for some? Well it didn't work for me, and this is an absurd amount of time for this bug to still exist. Can't understand why any responsible person would close this.

pfefffer commented 4 years ago

That does not necessarily work. I've had to access the sqlite db files in the Seafile/.seafile-data directory (notably, repo.db), get the repo_id of the offending repository from the RepoProperty table, and then delete from all those tables that contain that repo_id. Restarting the client, I could then resynchronize the repository.

Thanks! I stopped the seafile client and used https://sqlitebrowser.org/dl/ to open repo.db (in seafile-data), in the table "RepoProperty" I found the problematic folder and changed its path in the table to something non extisting (just adding "-") to it. Then, I closed the sqlite browser saving the edit. Now starting seafile client allows syncing the existing folder.

Worms222 commented 4 years ago

That does not necessarily work. I've had to access the sqlite db files in the Seafile/.seafile-data directory (notably, repo.db), get the repo_id of the offending repository from the RepoProperty table, and then delete from all those tables that contain that repo_id. Restarting the client, I could then resynchronize the repository.

Thanks! I stopped the seafile client and used https://sqlitebrowser.org/dl/ to open repo.db (in seafile-data), in the table "RepoProperty" I found the problematic folder and changed its path in the table to something non extisting (just adding "-") to it. Then, I closed the sqlite browser saving the edit. Now starting seafile client allows syncing the existing folder.

Thank you very much, this worked flawlessly! People like you, posting the solution which worked for them are a blessing!