Bug 116006 - Exporting contacts to vcard generates _.vcf for EVERY contact without a real name
Summary: Exporting contacts to vcard generates _.vcf for EVERY contact without a real ...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kab3
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Koenig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-09 17:25 UTC by Rudolf Kollien
Modified: 2009-08-05 16:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rudolf Kollien 2005-11-09 17:25:29 UTC
Version:            (using KDE KDE 3.4.3)
OS:                Linux

When exporting contacts to vcard, then for each contact an individual file is created. Every file is named as christianname_surname.vcf

If there is no entry in this both contact fields (like this is for contacts of organizations, where no individual is named), then a file with the name _.vcf ist created. So if there a more than one "organization contact", than the lastone "wins". 

Would be better to use the organization name if no christen-/surname are defined (both empty).
Comment 1 Tobias Koenig 2005-12-10 18:45:09 UTC
SVN commit 487459 by tokoe:

Bugfix of #116006

BUGS:116006


 M  +12 -1     vcard_xxport.cpp  


--- branches/KDE/3.5/kdepim/kaddressbook/xxport/vcard_xxport.cpp #487458:487459
@@ -132,9 +132,20 @@
           return true;
 
         KABC::AddresseeList::ConstIterator it;
+        uint counter = 0;
         for ( it = list.begin(); it != list.end(); ++it ) {
-          url = baseUrl.url() + "/" + (*it).givenName() + "_" + (*it).familyName() + ".vcf";
+          QString testUrl;
+          if ( (*it).givenName().isEmpty() && (*it).familyName().isEmpty() )
+            testUrl = baseUrl.url() + "/" + (*it).organization();
+          else
+            testUrl = baseUrl.url() + "/" + (*it).givenName() + "_" + (*it).familyName();
 
+          if ( KIO::NetAccess::exists( testUrl + (counter == 0 ? "" : QString::number( counter )) + ".vcf", false, parentWidget() ) ) {
+            counter++;
+            url = testUrl + QString::number( counter ) + ".vcf";
+          } else
+            url = testUrl + ".vcf";
+
           bool tmpOk;
           KABC::AddresseeList tmpList;
           tmpList.append( *it );
Comment 2 Tobias Koenig 2009-08-05 16:27:53 UTC
The development of the old KAddressBook will be discontinued for KDE 4.4.
Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product.