diff --git a/.travis.yml b/.travis.yml index b9dcd63..fb7f40b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ python: - 3.5 - 3.6 - 3.7 - - 3.8 + - 3.8-dev addons: apt: update: true diff --git a/comfortable_swipe/autostart.py b/comfortable_swipe/autostart.py index 164a335..2580e97 100644 --- a/comfortable_swipe/autostart.py +++ b/comfortable_swipe/autostart.py @@ -45,6 +45,11 @@ def get_status(): # sets the autostart status def set_status(status=ON): if status == ON: + # make sure dir exists + path = target_path() + path_dir = os.path.dirname(path) + if not os.path.exists(path_dir): + os.makedirs(path_dir) with open(target_path(), 'w') as file: file.write(template()) elif status == OFF: