After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783358 - Operations on entries with multiple parents may have unexpected results
Operations on entries with multiple parents may have unexpected results
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: google backend
git master
Other Linux
: Normal normal
: ---
Assigned To: Debarshi Ray
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2017-06-02 14:21 UTC by Ondrej Holy
Modified: 2018-09-21 18:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ondrej Holy 2017-06-02 14:21:46 UTC
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?
Comment 1 Ondrej Holy 2017-06-14 13:25:21 UTC
Actually, this isn't probably such problem with the current code, because the entry is listed only for its first parent, this is a problem with patch from Bug 771390. So, there is another problem currently, that you can't see the entries in all parent folders, but only in one of them...
Comment 2 Ondrej Holy 2017-06-14 13:25:39 UTC
See how to create such files on the web:
https://bugzilla.gnome.org/show_bug.cgi?id=771390#c12
Comment 3 GNOME Infrastructure Team 2018-09-21 18:06:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gvfs/issues/297.