-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oc.mkdir with subfolders HTTP error 409. Solution? #213
Comments
409 is a Webdav thing if you try to create a folder where the parent doesn't exist. One idea would be to extend pyocclient to add an argument Marking as enhancement. In the meantime you can use |
of course you're also welcome to contribute to pyocclient by improving |
Thank you for the quick answer. |
I mean call I'd rather suggest catching 409 explicitly and then trying to create parent. If 409 as well, continue recursively up to root. |
I made a simple quick and dirty code to create the folders revursivly. I made a pull request but I don't know if I'd done it right because it doesn't show here? |
@MoonPie88 you need to select this repository owncloud/pyocclient as the target of your PR |
Hello,
when trying to create a folder, for example /folder1/folder2/folder3, I get a HTTP error 409 if the "main folders", folder1/folder2, don't exist.
So I have to create folder1 and folder2 before creating folder3, but it is also possible that folder1 already exists.
Is it possible to check if the folder aleady exists without getting a HTTP error?
Or do you have any other solution?
The text was updated successfully, but these errors were encountered: