-
Notifications
You must be signed in to change notification settings - Fork 47
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
Introduce the general idea of overwrite NA/TRUE/FALSE #266
Conversation
In previous refactoring commit, I stopped checking whether both `path` and `parents` were specified in `drive_upload()`. I claim this is incredibly rare and not worth the code and headspace to maintain. Let the behaviour be undefined / undescribed and, if it is wrong or surprising and actually matters, someone will speak up.
Tests added in the next commit revealed that, for filepath input to `drive_rm()`, we tried to delete each file n times, where n = the number of filepaths for that file. n can be greater than 1 if a file has multiple parents.
I am removing checks and tests around unusual parent situations elsewhere. I intend to send people to drive_update() for all weird parent folder situations. So I want an explicit test that you can add a parent folder this way.
Revisit this later with lifecycle
Closes #230
@LucyMcGowan This is the biggest piece of work in googledrive since its release (other than the adoption of gargle, which didn't really add or change a Drive feature per se). I still need to add tests for this and make sure And I can fly solo here. But if you are in a position to look this over, it is always great to have another set of eyeballs. Even if you just read and comment, that's welcome. |
Refine tests
But I have seen that the presence of files on Drive, in the trash, can affect tests. Tests should technically leave the trash the way the found it and be "trash-aware". But sometimes it's easiest to just clean it out.
Truly closes #230
I took a quick look, and this looks awesome! The only thing I noticed is we already had an overwrite parameter for |
Thanks @LucyMcGowan, that's a good point. I added a "local" qualifier there, to serve as a reminder of where the overwrite could occur. |
Closes #230
I decided that, if
overwrite
happens anywhere (such as indrive_upload()
, it should happen for the entire set of functions that create new files.drive_put()
is also new.