Bump reva
This commit is contained in:
+4
-5
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user