|
Abbey Workshop |
||||||||||
I ran across some really strange problems with rsync recently and thought I should share my experiences. First off, I have a Mac laptop and desktop and the same for the PC, a laptop and a desktop. So when I code, I often switch between platforms. Subversion is used to keep the data in sync. Rsync is then used to copy the data to my web server. When things are working, updating the blog is a snap.
So recently, I started having problems with this. When rsyncing to the server, instead of copying the files, rsync would create a new directory with a question mark at the end of the name. For example, if the directory was /home/target, the files would get copied /home/target?. Just bizzare. Unfortunately, this problem first started to manifest itself right after upgrading my Mac's to OS X 10.4 Tiger. This threw me off for some time as I thought it to be Tiger problem. But eventually, it manifested itself on Windows too.
I had recently tried out a new text editor on Windows. That was my mistake. Unknown to me this editor, which shall remain nameless, began to insert nonprinting characters into the file. This caused rsync to freak out and create the extra directory. By copying the text file to the clipboard, deleting the file, then pasting the text into a real editor like JEdit or vi, the mystery characters disappeard. Now everything works fine.
Lessons learned? Don't use Windows to develop anything unless you have no other choice! I'm in the process of getting VMWare Player setup on my Windows machine so I can run Ubuntu Linux for anything important.
Copyright © Abbey Workshop 2006