#!/usr/bin/perl -w
#
# Clawsker :: A Claws Mail Tweaker
-# Copyright 2007-2014 Ricardo Mones <ricardo@mones.org>
+# Copyright 2007-2015 Ricardo Mones <ricardo@mones.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
}
sub check_claws_not_running {
- my $socket = (not $ALTCONFIGDIR)? "/tmp/": $CONFIGDIR;
- $socket .= "claws-mail-$<";
+ my $tmpdir = (defined $ENV{TMPDIR})? $ENV{TMPDIR}: '/tmp';
+ $tmpdir = '/tmp' if ($tmpdir eq '');
+ my $socket = (not $ALTCONFIGDIR)? $tmpdir: $CONFIGDIR;
+ $socket .= "/claws-mail-$<";
-S $socket and return claws_is_running ();
# since 3.9.0cvs36
- my $lockdir = "/tmp/claws-mail-$<";
+ my $lockdir = "$tmpdir/claws-mail-$<";
-d $lockdir and do {
$_ = $CONFIGDIR;
s/\/$//;
sub opt_clawsrc {
my ($name, $value) = @_;
- die _("Error: '{value}' is not a file or does not exist", value => $value)
+ die _("Error: '{value}' is not a file or does not exist\n", value => $value)
unless -f $value;
set_rc_filename ($value);
}
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.";
- my $year = "2007-2014";
+ my $year = "2007-2015";
my $holder = "Ricardo Mones <ricardo\@mones.org>";
my $url = "http://www.claws-mail.org/clawsker.php";