You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Google Drive, given a folder folder 1 with a file file A inside. Then file A is moved out of folder 1 into folder 2. And folder 1 is deleted.
Both folder 1 and file A are currently loaded into memory.
When folder 1 is pulled, it is marked as deleted and so are its current children, including file A. When file A is pulled afterwards, all its attributes remain unchanged except for its parent (now folder 2). So when we call #save, it updates only parent in the database — not the other attributes. So in the database file A remains incorrectly marked as deleted.
We can fix this by either marking all force-update fields as dirty: name_will_change! and parent_id_will_change! etc...
Or we can drop those fields completely and use just current_version_id for inheriting those fields (and forcing current_version_id to update by marking it as dirty!)
On Google Drive, given a folder
folder 1with a filefile Ainside. Thenfile Ais moved out offolder 1intofolder 2. Andfolder 1is deleted.Both
folder 1andfile Aare currently loaded into memory.When
folder 1is pulled, it is marked as deleted and so are its current children, includingfile A. Whenfile Ais pulled afterwards, all its attributes remain unchanged except for its parent (now folder 2). So when we call#save, it updates only parent in the database — not the other attributes. So in the databasefile Aremains incorrectly marked as deleted.We can fix this by either marking all force-update fields as dirty:
name_will_change!andparent_id_will_change!etc...Or we can drop those fields completely and use just current_version_id for inheriting those fields (and forcing current_version_id to update by marking it as dirty!)