Twitter Updates

3/16/2005

I made this… thing!

Filed under: — AlienMind @ 10:55 pm

While I think I’ve got the problem solved by other means, I found a problem where using rsync to syncronize two directories via the standard rsync protocol corrupted .webloc files (these are url location files – you drag the URL to the desktop and it creates a file that links to that site).

This is rsync across the network using an SSH tunnel between two Macs. Please don’t suggest using AFP. Just… don’t.

Well, in Mac OS X the ”.webloc” files store their information in the resource fork of the file, and standard rsync doesn’t copy the resource fork, thus corrupting the file.

So, using bits and pieces from other posts I managed to cobble together an AppleScript that will convert the .webloc file to a platform-independent .url file. Then, I simply attached that script as a folder action to my Desktop folder. Now, when I drag a .webloc file to the desktop it is automagically converted to a .url file.

Ok, one could argue that only Mac OS X would ever have this problem, and I can’t argue with that, but I can see folder actions being useful in more than just this case.

Leave a Reply

  20 queries. 0.458 seconds. Powered by WordPress