Closed pklapperich closed 5 years ago
The script doesn't seem to crawl the entire directory structure but only changes ownership of the objects immediately within the shared folder.
That's incorrect. Recursion happens for any nested folder at any depth: https://github.com/davidstrauss/google-drive-recursive-ownership/blob/master/transfer.py#L112
Between this and the #19, it's hard to find usefulness in this script outside cases simple situations that are relatively quick to do manually via the web interface already.
Directory structures are preserved under many but not all circumstances. Much of this is a result of how Google Drive handles objects, which isn't like a normal file system. One of the characteristics is that a file cannot be in a folder for someone without being shared or owned by them, but sometimes changing the owner seems to put the object into the root of the destination user's Google Drive.
In general, it's a lot harder to move a hierarchy when the items (or at least folders) aren't already shared to the destination account. The script handles the sharing/ownership to the best ability of the API, which appears more limited than some of what the web app itself does, which offers recursive sharing (but not ownership changes) directly.
So, I believe you can work around the issue by pre-sharing. I'm not sure it's possible to solve in the script itself.
@davidstrauss any chance we get some UTF8 love so we can use the script for non ASCII filenames?
any chance we get some UTF8 love so we can use the script for non ASCII filenames?
Let's chat on #26, which I see you've created.
The script doesn't seem to crawl the entire directory structure but only changes ownership of the objects immediately within the shared folder.
Between this and the #19, it's hard to find usefulness in this script outside cases simple situations that are relatively quick to do manually via the web interface already.