drive-cli icon indicating copy to clipboard operation
drive-cli copied to clipboard

Fix Authorization & Refactor of utils

Open chrischansonichu opened this issue 6 years ago • 2 comments

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.

chrischansonichu avatar Apr 13 '20 19:04 chrischansonichu

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

chrischansonichu avatar Apr 13 '20 19:04 chrischansonichu

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

takashi1kun avatar Oct 29 '20 15:10 takashi1kun