Live data from Hacker News

Google Drive: Shortcuts replacing files and folders stored in multiple locations

support.google.com

61–70 of 74 posts

Re: Google Drive: Shortcuts replacing files and folders stored in multiple locations

#61
post #57
post #32

Earlier quoted context omitted.

I worked on another sync client's representation of filesystem structure, and came to the same conclusion. Hard links enable some cool behavior, but in retrospect added more complexity than anyone expected. Migrating to shortcuts / soft links seems very reasonable - I wish I had started there.

What kinds of cool behavior do hard links enable?

[deleted]

Re: Google Drive: Shortcuts replacing files and folders stored in multiple locations

#62
post #56

So, hard links are being replaced symbolic links. Most people I know prefer symlinks for most uses, so this feels like better UX.

What happens if you put a file in both the House Projects folder and the Current Projects folder, and then want to delete one of them?

One folder contains the original file, and one folder contains a shortcut to the file. There's no concept of a file existing in multiple folders with this change, only 1 source file and shortcuts linking to it. If you delete the original file, I assume the shortcuts are deleted too.

Re: Google Drive: Shortcuts replacing files and folders stored in multiple locations

#63
post #57
post #32

Earlier quoted context omitted.

I worked on another sync client's representation of filesystem structure, and came to the same conclusion. Hard links enable some cool behavior, but in retrospect added more complexity than anyone expected. Migrating to shortcuts / soft links seems very reasonable - I wish I had started there.

What kinds of cool behavior do hard links enable?

Apple's Time Machine uses hard-linked directories to replicate your home directory again and again, but with only the changed directories/files actually taking up space. The unchanged directories are just hard-linked to the previous versions, so any one version looks like your entire drive, but it takes much less space than full copies.

Re: Google Drive: Shortcuts replacing files and folders stored in multiple locations

#64
Until today, I didn't know you could create hard links (ie "multi-parent" files/folders) in Google Drive.

How did one achieve this? I would like to know, because I'm wondering if I have unintentionally done so. I gather this is completely different from "Make a copy" in the web UI. So how did you do it?

Re: Google Drive: Shortcuts replacing files and folders stored in multiple locations

#65
post #57

Earlier quoted context omitted.

What kinds of cool behavior do hard links enable?

Apple's Time Machine uses hard-linked directories to replicate your home directory again and again, but with only the changed directories/files actually taking up space. The unchanged directories are just hard-linked to the previous versions, so any one version looks like your entire drive, but it takes much less space than full copies.

Used to, the new APFS implementation uses snapshots.

Re: Google Drive: Shortcuts replacing files and folders stored in multiple locations

#66
So, if I intentionally have the same photo in two different directories, because I want to edit one while keeping the other as a fallback, GDrive has just killed off my failsafe. Do I understand this correctly?

If so, what more compelling reason could there be to go migrate right away to Dropbox (or a similar service)?

Re: Google Drive: Shortcuts replacing files and folders stored in multiple locations

#67

So, if I intentionally have the same photo in two different directories, because I want to edit one while keeping the other as a fallback, GDrive has just killed off my failsafe. Do I understand this correctly? If so, what more compelling reason could there be to go migrate right away to Dropbox (or a similar service)?

No you did not understand that correctly. You are confusing the same file stored under two locations and two different files stored under two locations with the same contents. This has been discussed multiple times in other comments on this thread.

Re: Google Drive: Shortcuts replacing files and folders stored in multiple locations

#68
Google have been working up to this change for quite a while now. Rclone supports shortcuts from version v1.54.0 released on 2021-02-02. I've been impressed with the communication from Google and the care they've taken to keep things working in what must be a difficult transition.

I hope that this change can finally unlock the API to be able to return all the children of a given node recursively. Multiple parents make this much harder.

The drive API doesn't have that at the moment and it makes traversing deep directory trees really painful.

An API search term to find the objects which have a given ID as an ancestor at any depth would be fantastic.

Re: Google Drive: Shortcuts replacing files and folders stored in multiple locations

#69
post #56

Earlier quoted context omitted.

What happens if you put a file in both the House Projects folder and the Current Projects folder, and then want to delete one of them?

One folder contains the original file, and one folder contains a shortcut to the file. There's no concept of a file existing in multiple folders with this change, only 1 source file and shortcuts linking to it. If you delete the original file, I assume the shortcuts are deleted too.

Yes, and that's annoying.

Re: Google Drive: Shortcuts replacing files and folders stored in multiple locations

#70
post #51
post #3

I worked on the original (long since superseded) implementation of the metadata store for Google Drive, i.e. the system which was responsible for tracking file / folder relationships. The requirement to allow an item to appear in multiple locations was a huge complication, in part because of the way it interacted with permissions being inherited from a folder to the items in that folder. I imagine this change may be…

Googler, opinions are my own. This was my understanding as well. The original Drive was built effectively as a directed graph (with cycles allowed). Any file or folder could be stored in multiple locations. And permissions were at a per-file basis, so 2 people viewing the same folder may see different sets of files. And permissions were definitely a hard part of it, as if you applied new permissions to a folder and a…

Can you explain why team drives (now called shared drives) have a limit of 400.000 files while there are no limits and unlimited sharing for files in "my drive"?
Post reply on HN