Hi All
This patch add support for looking in
multiple possible Thunderbird profile
locations. Needed to make it work out of the box
on a Debian system.
See:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=375476Thanks,
Patrick
--- mab2vcard.org 2009-09-02 09:50:03.000000000 +0200
+++ mab2vcard 2009-09-06 18:13:30.000000000 +0200
@@ -131,7 +131,7 @@
require 5;
#use diagnostics;
use strict;
-use constant ABOOK_PATHS => qw (~/.thunderbird/);
+use constant ABOOK_PATHS => qw (~/.thunderbird/ ~/.mozilla-thunderbird);
#use Data::Dumper;
my $progname = $0; $progname =~ s@.*/@@g;
@@ -488,14 +488,12 @@
sub locate_default_abook {
my @files;
foreach my $path (ABOOK_PATHS) {
- my $dir = glob($path);
- use Data::Dumper; print Dumper($dir);
+ # work around the weird semantics of glob() in scalar mode...
+ my $dir = (glob($path))[0];
next unless $dir;
- error ("$path is not a directory. Please correct ABOOK_PATHS in the script '$progname'")
- unless -d $dir;
+ next unless -d $dir;
$dir=~s/\/*\s*$//;
-print Dumper($dir);
- push @files,(glob $dir.'/abook.mab');
+ push @files,$dir.'/abook.mab' if -e $dir.'/abook.mab';
push @files,(glob $dir.'/*/abook.mab');
push @files,(glob $dir.'/*/*/abook.mab');
}
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
Gtkpod-devel mailing list
Gtkpod-devel@...
https://lists.sourceforge.net/lists/listinfo/gtkpod-devel