gtg team mailing list archive
-
gtg team
-
Mailing list archive
-
Message #03673
[Merge] lp:~izidor/gtg/autostart-problem into lp:gtg
Izidor Matušov has proposed merging lp:~izidor/gtg/autostart-problem into lp:gtg.
Requested reviews:
Gtg developers (gtg)
Related bugs:
Bug #1073607 in Getting Things GNOME!: ""GTG starts after login" doesn't work with an invalid link"
https://bugs.launchpad.net/gtg/+bug/1073607
For more details, see:
https://code.launchpad.net/~izidor/gtg/autostart-problem/+merge/132360
A small patch that GTG after login works even with a broken symlink.
--
https://code.launchpad.net/~izidor/gtg/autostart-problem/+merge/132360
Your team Gtg developers is requested to review the proposed merge of lp:~izidor/gtg/autostart-problem into lp:gtg.
=== modified file 'GTG/gtk/preferences.py'
--- GTG/gtk/preferences.py 2012-08-08 14:56:18 +0000
+++ GTG/gtk/preferences.py 2012-10-31 15:46:28 +0000
@@ -53,6 +53,11 @@
if not os.path.exists(AUTOSTART_DIRECTORY):
os.mkdir(AUTOSTART_DIRECTORY)
+ # If the path is a symlink and is broken, remove it
+ if os.path.islink(AUTOSTART_PATH) and \
+ not os.path.exists(os.path.realpath(AUTOSTART_PATH)):
+ os.unlink(AUTOSTART_PATH)
+
if os.path.isdir(AUTOSTART_DIRECTORY) and \
not os.path.exists(AUTOSTART_PATH):
if hasattr(os, "symlink"):