Operations on entries with multiple parents may have unexpected results
@oholy
Submitted by Ondrej Holy Assigned to Debarshi Ray @debarshir
Link to original bug (#783358)
Description
Google drive backend doesn't allow to create entries with multiple parent folders (I hope at least), however, such entries may be created on Drive web (so, one file belongs to multiple folders). Operations with such entries may be unexpected for users...
The problem is that UI doesn't indicate indicate it anyhow... maybe we can introduce some special file attribute and show some emblem on an icon in Nautilus at least...?
Just a note that the backend doesn't expect such entries may exist, which may lead to failures, missing monitor events, invalid cache entries etc. This should be more-or-less addressed by the patch proposed in Bug 771390.
The most problematic case is probably deleting, which may lead to data loss. Entries are deleted completely from all parents, not only from one folder. I think that gdata_documents_service_remove_entry_from_folder should be used instead of gdata_service_delete_entry!
_set_display_name changes display_name in multiple folders at one time! This may be pretty confusing, but should not lead to data loss at least. Shouldn't we rather create a new entry instead and rename it?
Writing operation updates entries in all parent folders. This is similar as _set_display_name, but may lead to data loss, because the user may expect that has a copy in another folder. Shouldn't we rather create a new entry instead?
What do you think?
Version: git master