update location of addrbook sub-folder in address conversion scripts
[claws.git] / tools / tb2claws-mail
index 5c0e55aa6f7493958f25f5912c351077d34848b8..70300610a515ae2aac11148f50f54378ccc51982 100755 (executable)
@@ -43,7 +43,7 @@ $total_addresses = 0;
 chdir;
 
 # check is Claws-Mail instrtalled
-opendir(CLAWS, ".claws-mail") || die("Can't open Claws Mail directory! Conversion abroted\n");
+opendir(CLAWS, ".claws-mail/addrbook") || die("Can't open Claws Mail directory! Conversion aborted\n");
     push(@cached, (readdir(CLAWS)));
 closedir(CLAWS);
 
@@ -251,12 +251,12 @@ foreach $tbline (@tblines) {
 $claws_addr .= "</address-book>\n";
 
 # print new addressbook to file
-open (NEWADDR, ">.claws-mail/$new_addrbk");
+open (NEWADDR, ">.claws-mail/addrbook/$new_addrbk");
     print NEWADDR $claws_addr;
 close NEWADDR;
 
 # add new addressbook to index
-open (ADDRIN, "<.claws-mail/addrbook--index.xml") || die("Can't open addrbook--index.xml");
+open (ADDRIN, "<.claws-mail/addrbook/addrbook--index.xml") || die("Can't open addrbook--index.xml");
     @addrindex_file = <ADDRIN>;
 close ADDRIN;
 
@@ -269,7 +269,7 @@ foreach $addrindex_line (@addrindex_file) {
     }
 }
 
-open (NEWADDRIN, ">.claws-mail/addrbook--index.xml");
+open (NEWADDRIN, ">.claws-mail/addrbook/addrbook--index.xml");
     print NEWADDRIN "$rewrite_addrin";
 close NEWADDRIN;
 print "You have sucessfully converted your The Bat! addressbook\n";