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
Source path is '/webdav/foobar' while destination is '/barfoo'. The leading path (root) is included in the source because it is relative to the URI ('http://myserver.com/webdav') while the destination is not.
I feel like this is a bug in the client and that it is inconsistent in how it handles paths. This situation requires the user to prepend the root path to the destination when using move() or copy(). All other operations use relative paths (as it should be).
... by prepending this.root to pathDestination. Or by passing the destination as a full URI (relative to the connection base URI), in which case it would be parsed server-side and also be handled correctly.
The text was updated successfully, but these errors were encountered:
If you are using the webdav client with a url such as...
And you try to perform a move operation like...
You receive a 404 error because on the server side:
https://github.com/OpenMarshal/npm-WebDAV-Server/blob/ca245a2208070fde0bfc8f2610bbcd375fad1eb4/src/server/v2/commands/Move.ts#L22
Source path is '/webdav/foobar' while destination is '/barfoo'. The leading path (root) is included in the source because it is relative to the URI (
'http://myserver.com/webdav'
) while the destination is not.I feel like this is a bug in the client and that it is inconsistent in how it handles paths. This situation requires the user to prepend the root path to the destination when using
move()
orcopy()
. All other operations use relative paths (as it should be).This could be "fixed" fairly easily in the client...
https://github.com/OpenMarshal/npm-WebDAV-Client/blob/master/src/index.ts#L373
... by prepending
this.root
topathDestination
. Or by passing the destination as a full URI (relative to the connection base URI), in which case it would be parsed server-side and also be handled correctly.The text was updated successfully, but these errors were encountered: