gcalcli icon indicating copy to clipboard operation
gcalcli copied to clipboard

configFolder option doesn't work

Open strogiyotec opened this issue 5 years ago • 2 comments

According to documentation

gcalcli is able to store all its necessary information in a specific folder (use the --configFolder option.) Each folder will contain 2 files: oauth and cache

By default gcalcli creates oauth and cache in my home directory. I moved them into .config folder and want to specify new location using this command

gcalcli --configFolder ~/.config/gcalcli/ agenda

~/.config/gcalcli/ stores two files : .gcalcli_cache .gcalcli_oauth However I got this output

UserWarning: Cannot access ~/.gcalcli_oauth: No such file or directory
  warnings.warn(_MISSING_FILE_MESSAGE.format(filename))

Your browser has been opened to visit:

Which means that gcalcli ignored --configFolder location and tried to find oauth file inside home directory. How can I specify custom config folder ? Thank you (version gcalcli v4.3.0)

strogiyotec avatar Jun 15 '20 16:06 strogiyotec

Repro'd. Thanks for the report.

jcrowgey avatar Jun 16 '20 16:06 jcrowgey

Actually, looking closer, I believe that the issue is that when the files are in your home dir, they're named .gcalcli_oauth and .galcli_cache. The leading . hides them from normal dir listings and the gcalcli_ prefix namespaces them since they're in a generic location. However, when these files live in a specified folder, they no longer need the leading dot nor the prefix, they're simply called oauth and cache.

I don't think this is a software bug, since the usual workflow would be to let gcalcli create these files for you.

jcrowgey avatar Jun 16 '20 17:06 jcrowgey