Folders get duplicated in copy operation inside a GIO/GVFS filesystem
Predecessor Steps:
- In Gnome Control Center, Online Accounts, a Google account was added with access to Google Drive.
- Using Thunar, that account was displayed in Devices Panel. While mounted by the system, it is displayed in Network Panel as well.
- Browsing into the account, Google Drive folders are properly displayed, and it is possible to access all drive content.
Steps to reproduce:
- Browse up to one desired folder.
- Use the option normal way (click or Ctrl+C) to COPY.
- Browse up to another folder, which will be the destination.
- Paste (the previously copied folder).
- Thunar will normally display the copy operation.
- At the end of the copy, the pasted folder will be displayed twice, two sibling folders with the same name.
- Looking inside both folders, they have the same files, as expected (i. e. it has the same content as the original copied folder), but inside one of them each file is displayed with a link icon, and, inside the other, each file is displayed with a normal icon.
Further Investigations:
- The same steps were reproduced in the Gnome Nautilus, but there nothing went wrong, so a copy operation was done pretty well, with no duplication.
- This scenario was tested three times, with different folders, and the same results have always reproduced, in Thunar with duplication, but in Nautilus pretty well.
- Deep looking at the problem in the Linux terminal with the help of the gio command line (gio list -a "standard::display-name" ; gio info), I could discover two things:
- => One of the duplicated folders (where the inside files have link icons) has the LINK attribute (standard::is-symlink: TRUE / standard::symlink-target: /path/to/the/other/folder) pointing to its sibling.
- => In both sibling folders, all files are links pointing to the files inside the original folder initially copied. But this seems to be a desired result, as Google Drive never duplicates files when making copies inside it, it always makes links looking like files.