Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only recurses 1 level #25

Closed
pklapperich opened this issue Jun 24, 2019 · 3 comments
Closed

Only recurses 1 level #25

pklapperich opened this issue Jun 24, 2019 · 3 comments

Comments

@pklapperich
Copy link

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.

@davidstrauss
Copy link
Owner

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.

@Nottt
Copy link

Nottt commented Jul 12, 2019

@davidstrauss any chance we get some UTF8 love so we can use the script for non ASCII filenames?

@davidstrauss
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants