Bump reva

This commit is contained in:
André Duffeck
2025-03-24 08:47:22 +01:00
parent 467fc2af0c
commit c2ce9a136d
8 changed files with 56 additions and 27 deletions
+4 -5
View File
@@ -279,6 +279,8 @@ func (t *Tree) CreateDir(ctx context.Context, n *node.Node) (err error) {
// Move replaces the target with the source
func (t *Tree) Move(ctx context.Context, oldNode *node.Node, newNode *node.Node) (err error) {
lockFilePath := oldNode.LockFilePath()
if oldNode.SpaceID != newNode.SpaceID {
// WebDAV RFC https://www.rfc-editor.org/rfc/rfc4918#section-9.9.4 says to use
// > 502 (Bad Gateway) - This may occur when the destination is on another
@@ -331,11 +333,8 @@ func (t *Tree) Move(ctx context.Context, oldNode *node.Node, newNode *node.Node)
}
// rename the lock (if it exists)
if _, err := os.Stat(oldNode.LockFilePath()); err == nil {
err = os.Rename(
filepath.Join(oldNode.ParentPath(), oldNode.Name+".lock"),
filepath.Join(newNode.ParentPath(), newNode.Name+".lock"),
)
if _, err := os.Stat(lockFilePath); err == nil {
err = os.Rename(lockFilePath, newNode.LockFilePath())
if err != nil {
return errors.Wrap(err, "Decomposedfs: could not move lock")
}