diff --git a/docs/config.rst b/docs/config.rst index 9e5999a..fcfb5ab 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -187,7 +187,7 @@ Service to hardcode those into opensource software The ``token_file`` parameter should be a filepath where vdirsyncer can later store authentication-related data. You do not need to create the file itself -(or write anything to it), only the folder around it. +or write anything to it. You can select which calendars to sync on `CalDav settings page `_. diff --git a/vdirsyncer/storage/google.py b/vdirsyncer/storage/google.py index b4a451f..db4bd14 100644 --- a/vdirsyncer/storage/google.py +++ b/vdirsyncer/storage/google.py @@ -12,7 +12,7 @@ from click_threading import get_ui_worker from . import base, dav from .. import exceptions -from ..utils import expand_path, open_graphical_browser +from ..utils import checkdir, expand_path, open_graphical_browser logger = logging.getLogger(__name__) @@ -58,6 +58,7 @@ class GoogleSession(dav.DAVSession): ) def _save_token(token): + checkdir(os.path.dirname(token_file), create=True) with atomic_write(token_file, mode='w', overwrite=True) as f: json.dump(token, f)