Skip to content

Commit 669cd69

Browse files
authored
Fix io.cozy.files inconsistency on a sharing (#4475)
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.
2 parents 6e305be + 56d2767 commit 669cd69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

model/sharing/files.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func EnsureSharedWithMeDir(inst *instance.Instance) (*vfs.DirDoc, error) {
209209
} else {
210210
dir.CozyMetadata.UpdatedAt = now
211211
}
212-
_, err = vfs.RestoreDir(fs, dir)
212+
dir, err = vfs.RestoreDir(fs, dir)
213213
if err != nil {
214214
inst.Logger().WithNamespace("sharing").
215215
Warnf("EnsureSharedWithMeDir failed to restore the dir: %s", err)

0 commit comments

Comments
 (0)