Skip to content

Commit

Permalink
Fix io.cozy.files inconsistency on a sharing
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 committed Oct 16, 2024
1 parent bedfb68 commit 56d2767
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 56d2767

Please sign in to comment.