From 56d2767d3cf857d27a973fb8801c992ae26fdecb Mon Sep 17 00:00:00 2001 From: Bruno Michel Date: Wed, 16 Oct 2024 11:07:23 +0200 Subject: [PATCH] Fix io.cozy.files inconsistency on a sharing When someone puts the io.cozy.files.shared-with-me-dir directory to the trash and then accepts a sharing, the new directory was created with the wrong path. The io.cozy.files.shared-with-me-dir was restored, and the new directory path was computed with the old path in /.cozy-trash. --- model/sharing/files.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/sharing/files.go b/model/sharing/files.go index 0f78ea9b3d2..da6b3001a9e 100644 --- a/model/sharing/files.go +++ b/model/sharing/files.go @@ -209,7 +209,7 @@ func EnsureSharedWithMeDir(inst *instance.Instance) (*vfs.DirDoc, error) { } else { dir.CozyMetadata.UpdatedAt = now } - _, err = vfs.RestoreDir(fs, dir) + dir, err = vfs.RestoreDir(fs, dir) if err != nil { inst.Logger().WithNamespace("sharing"). Warnf("EnsureSharedWithMeDir failed to restore the dir: %s", err)