You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the makedirs function the path is created with help of os functions. On my Windows machine i get: NextcloudException(status_code, reason=codes(status_code).phrase, info=info) nc_py_api._exceptions.NextcloudException: [400] Bad Request <request: MKCOL https://nextcloud.XXX.com/remote.php/dav/files/Testuser/Folder%5CSubfolder
After a short debug i found the error in the line 177 os.path.join(_path, i).
The os function inserts a \ instead of /.
My simple fix is in nc_py_api/files/files.py Line 177:
replace: _path = os.path.join(_path, i)
with: _path = f"{_path}/{i}"
Describe the bug
In the makedirs function the path is created with help of os functions. On my Windows machine i get:
NextcloudException(status_code, reason=codes(status_code).phrase, info=info) nc_py_api._exceptions.NextcloudException: [400] Bad Request <request: MKCOL https://nextcloud.XXX.com/remote.php/dav/files/Testuser/Folder%5CSubfolder
After a short debug i found the error in the line 177 os.path.join(_path, i).
The os function inserts a \ instead of /.
My simple fix is in nc_py_api/files/files.py Line 177:
replace:
_path = os.path.join(_path, i)
with:
_path = f"{_path}/{i}"
Steps/Code to Reproduce
Expected Results
It creats folders if they dont exist
Actual Results
Throws Exception
Setup configuration
nc-py-api==0.15.0
nextcloud = 29.0.4
The text was updated successfully, but these errors were encountered: