Le 24 janv. 09 à 21:41, Jason a écrit :

I've done some digging around and using the condition if(unicharName[index]==0x003B) /* == ':' */ we never meet this case. I tried changing the unicharName[index]==':' and the subsequent slash unicharName. After rsync is compiled I am able to handle the slash cases again.

We are dealing with the single character in the array so would this be safe?

The only oddity now is if I run this for the first time on the backupbouncer src and dst folder I get the following error: rsync: rsync_xal_set: lsetxattr("Src/60-bsd-flags/dir-with- flags","com.apple.FinderInfo") failed: Unknown error: -5000 (-5000)

When I run again I get no error.

I'm using the following argumens: -aNXxH --protect-args --fileflags --force-change

Jason


Shame on me, I've made a stupid line following mistake on the ASCII table I looked at. Colon is 0x003A and NOT 0x003B. The code I gave you would change semicolon to slashes... Something useless. So, this mod should be the good one:

init:
+       unsigned int index=0;

code:
=       CFStringGetCharacters(cfStringName, range, unicharName);
        while(index<range.length)
        {
                if(unicharName[index]==0x003A) /* == ':' */
                        unicharName[index]=0x002F; /* == '/' */
                index++;
        }
= carbon_error=FSMakeFSRefUnicode(&parentRef, range.length, unicharName, kTextEncodingUnknown, ref);

Almost the same of your mod. Using ':' works, as you tested, but I prefer to use 0x003A instead of ':' because it makes a comparison between same variable sizes. It's a personal preference.

As always, let me know if it works. If so, I will update the patch.

Best regards,

Vitorio--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to