zycho42

Api 2.0 Removing Folders Deletes Empty Folders

Recommended Posts

Hi,

 

when I remove a folder using api 2.0 any empty folders in the shared folder are removed. I'm using "deletedirectory":"false" . Is this a bug or am I missing something?

 

I've also noticed the following:

- setting "deletedirectory":"true" does not remove the folders from the harddrive.

- sometimes removing folders results in a status_code other than 204 error and the folder is not removed. When removing say 10 folders I need to run my script several times before all folders are removed.

 

This is the exact code I'm using (python):

removed_folder = delete('http://my_ip:888/api/v2/folders/my_folder_key?token=my_token', delete={"deletedirectory":"false"}, auth=(my_user,my_password), cookies=my_cookie)

If anyone can shed some light on this I'd be most grateful!

 

Thanks,

 

Willem

Share this post


Link to post
Share on other sites

Hi Willem,

 

It's a bug, will be fixed soon. When you disconnect folder on Linux from regular UI - same issue happens, all empty folders are removed. The "deletedirectory" setting does not mean anything anymore - was removed recently (altogether with ability to delete all files in UI when user disconnects folder).

 

We'll update documentation also, thanks for reporting.

Share this post


Link to post
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.