[Synckolab] Synchronization to a shared folder is not working

Matthew Underwood matthew.underwood at jemmac.com
Fri Oct 14 16:15:13 EDT 2005

Simple change sorts it out for me (well it gets a bit further),

I changed copyToFolder to use 'syncAddressBook.folder' (that was found
earlier), rather than looking the folder object up again.

function copyToFolder (fileName, folderUri)
    var fileSpec = Components.classes["@mozilla.org/filespec;1"].

    fileSpec.nativePath = fileName;

    // at this pont, check the content, we do not write a load of 		
    // bogus messages in the imap folder
    copyservice =

    // in order to be able to REALLY copy the message setup a
    // listener

    copyservice.CopyFileMessage(fileSpec, syncAddressBook.folder, null,
	false, kolabCopyServiceListener, msgWindow);

I was looking at replacing the copyservice lines with,

syncAddressBook.folder.copyFileMessage(fileSpec, null, false, msgWindow,

But this doesn't seem to call the OnStopCopy method in 

Now I just need to workout why the phone numbers don't end up in the 
address cards.


Matthew Underwood wrote:
> Hopefully this will match up with the thread of the same name from July 
> 25/26. If not, the gist of it was something like this..
> SyncKolab doesn't store contacts to shared folders what the shared 
> folder heirarchy contains / as the separator, it seems to be trying to 
> use ^ as a separator.
> I get the same problem. I'm using 0.4.18 in TB 1.0.7. My IMAP server is 
> MDaemon. I'm trying to synchronize my contacts into 'Public 
> Folders/Public Contacts'. But this fails, the IMAP server log shows the 
> attempt to write to 'Public Folders^Public Contacts'.
> Whilst hunting around for solutions to this problem I came across the 
> file nsImapUrl.cpp which interestingly has an EscapeSlashes method for 
> the nsImapUrl. The method escapes a / (slash) character to a ^ (hat) 
> character for characters in the folder that aren't part of the hierarchy.
> i.e.
>   "Public\Common Folders"\"Public Contacts"
> should become
>   Public^Common Folders\Public Contacts
> I'm suspecting that
>   var mailFolder = 
> RDF.GetResource(folderUri).QueryInterface(Components.interfaces.nsIMsgFolder); 
> on line 526 of synckolab.js isn't working properly to get the 
> nsIMsgFolder object as the resource returned sees the slashes in 
> folderUri as literal slashes and not heirarchy delimiters. That is, it 
> looks like a problem with GetResource(...).
> Matt.
> _______________________________________________
> Synckolab mailing list
> Synckolab at mozdev.org
> http://mozdev.org/mailman/listinfo/synckolab


Matthew Underwood
Senior Consultant

+44 (0)1234 757254
matthew.underwood at jemmac.com <mailto:matthew.underwood at jemmac.com>

	*Jemmac Software Limited*

Trent House
Cranfield Technology Park
MK43 0AN

Tel +44 (0)1234 757240
Fax +44 (0)1234 757241
Web www.jemmac.com <http://www.jemmac.com>

More information about the Synckolab mailing list