summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmdkapplet12
1 files changed, 6 insertions, 6 deletions
diff --git a/mdkapplet b/mdkapplet
index a3ed5f9a..f9c715f2 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -306,14 +306,14 @@ sub about {
sub setAutoStart {
my $state = shift;
my $file = "$ENV{HOME}/.mdkonline";
- if (-e $file) {
+ if (-f $file) {
my %s = getVarsInSh($file);
-
- }
- output_p $file,
- qq(AUTOSTART=$state
+ $s{AUTOSTART} = $state;
+ setVarsInSh($file, \%s);
+ } else { output_p $file,
+ qq(AUTOSTART=$state
);
- chmod 0644, "$ENV{HOME}/.mdkonline";
+ }
}
sub mainQuit() {
setAutoStart('FALSE');