Skip to content

Commit

Permalink
Fix io.cozy.files inconsistency on a sharing (#4475)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nono authored Oct 17, 2024
2 parents 6e305be + 56d2767 commit 669cd69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/sharing/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 669cd69

Please sign in to comment.