Problem With Add_Folder


detlefz

Recommended Posts

We use the add_Folder api call. With bittorrent Version 1.3.109  I can add a Folder with existing files for sync with bittorrent. With Version 1.4.75 I got the Response:

 

 

http://api: ... /api?method=add_Folder&dir=c:\start

 

{ "error": 105, "message": "Zielordner ist nicht leer. Trotzdem hinzufügen?" }

 

Can anyone give me a tip? I want to sync I Folder with existing files. With the Desktop Client, there ist no Problem.

 

Thanks

 

 

Link to comment
Share on other sites

This is the consequence of an undocumented SyncAPI change. See Issue #154. I also discovered, that the (also) undocumented parameter force=1 solves the problem.

 

curl -u admin:admin 'http://localhost:8888/api?method=add_folder&dir=/mnt/btsync/test1&secret=ASFODAMD23QUM2H65QVTB6GZRVAOSRTN7'{ "error": 105, "message": "Destination folder is not empty.  Add anyway?" }

 

After adding force=1

 

curl -u admin:admin 'http://localhost:8888/api?method=add_folder&dir=/mnt/btsync/test1&secret=ASFODAMD23QUM2H65QVTB6GZRVAOSRTN7&force=1'{ "error": 0 }
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.