From d23a1092b35b8d0cbf469674ac02f006ba2ecde1 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 21 Feb 2023 16:03:08 +0100 Subject: ayatana-settings: Create ~/.config/autostart folder if it does not yet exist. --- ayatana-settings | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ayatana-settings b/ayatana-settings index 7daae0a..78db62a 100755 --- a/ayatana-settings +++ b/ayatana-settings @@ -226,7 +226,12 @@ class AyatanaSettings: else: ''' - sPath = '~/.config/autostart/ayatana-indicator-{}.desktop'.format(sIndicator) + sAutostartFolder = '~/.config/autostart' + pAutostartFolder = pathlib.Path(sAutostartFolder).expanduser() + if not pAutostartFolder.exists(): + pAutostartFolder.mkdir(parents=True) + + sPath = '{autostart}/ayatana-indicator-{indicator}.desktop'.format(autostart=sAutostartFolder, indicator=sIndicator) pPath = pathlib.Path(sPath).expanduser() if not pPath.exists(): -- cgit v1.2.3