Skip to content

Commit

Permalink
Exit gracefully when autostart creation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
bryango committed May 24, 2024
1 parent 23b689f commit 18490a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Mailnag/configuration/configwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,12 @@ def _create_autostart(self):
if not os.path.exists(autostart_folder):
os.makedirs(autostart_folder)

shutil.copyfile(src, dst)
try:
shutil.copyfile(src, dst)
except Exception as e:
import logging
logging.info(f"failed setting autostart: {e}")
return

# If mailag-config was started from a local directory,
# patch the exec path of the autostart .desktop file accordingly.
Expand Down

0 comments on commit 18490a0

Please sign in to comment.