Skip to content

Conversation

@chrischansonichu
Copy link

This started as a small fix for #86 but it then became pretty clear that in order to fix that seemingly small issue, most of the app needed a total overhaul. I combined all of the utils functions that shared functionality into a single Drive class, removing an enormous amount of boilerplate code in the process. Added some tests for auth, but this should just be seen as the first step on a long journey to add functionality and reduce waste.

…calling authorization using downloaded oauth json files properly.
@chrischansonichu
Copy link
Author

This additionally changes all of the config locations to $USER/.config/drive-cli/, thus also fixing #90.

@chrischansonichu chrischansonichu marked this pull request as draft April 13, 2020 20:13
…exists checking, and giving the user clearer messages regarding failures.
…ng an error advising the user to first log in, any time a method is called.
…re supposed to be JSON files. Add check for '.history' as a file rather than a directory.
…edService if there is no token.json file present in the config directory. This object returns an error advising the user to log in if they attempt to call any method from it.
@takashi1kun
Copy link

you should replace line 36 of auth.py with
client_id = Path(str(json_file)) if json_file else config_path.joinpath('oauth.json')
i was not able to run your version on w10 with what you had because it keep saying that "is_file()" is no property of str, i do not know about linux but in w10 the property was treated as a str rather than a Path so you have to convert it to a path first

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

Successfully merging this pull request may close these issues.

3 participants