Thomas Constans wrote:
Hello,

First of all, many thanks for this nice piece of software !

I am actually building a pygtk frontend to rsync + rsyncrypto.
Cool. Send it here when it's ready :-)
I was having some troubles on the newest (and crappiest) microsoft
product:
To support old applications, windows xp style directories (my documents,
application data, and so forth) are implemented in Windows Vista using
some kind of symlink, called "junction".

And rsyncrypto actually choke on such file, giving a "input/output
error".
Sadly, I have to admit that I do not have Vista around, and I have been trying very hard to avoid it up until now. It seems I'll have to go get me a copy :-(

Amazing. So Windows Vista has "junction points" (http://msdn.microsoft.com/en-us/library/bb968829(VS.85).aspx), but also has symbolic links (http://msdn.microsoft.com/en-us/library/aa365680(VS.85).aspx). And guess what - they are not the same! Blah....

On Windows, rsyncrypto uses the GetFileAttributesEx function to figure out what the type of the file is. The docs seem to suggest that junction points will have FILE_ATTRIBUTE_REPARSE_POINT set. I'll see what can be done with the code to make it work. As I don't have access to a Vista machine, if you could verify that point, it would be much appreciated. A tiny program to print (even hexa-decimal) the attributes of a junction point and send the result here would be enough.
It would be nice if rsyncrypto can handle (meaning ignore) this kind of
file more graciously.

Can you try compiling the attached patch letting me know how it fares?
Best regards

Keep up the good work
Shachar

Index: win32/autofd.h
===================================================================
--- win32/autofd.h	(revision 545)
+++ win32/autofd.h	(working copy)
@@ -12,6 +12,8 @@
 // Fill in missing declarations
 #define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
 
+#define S_IFLNK 0120000
+
 #define S_IRWXU 00700
 #define S_IRUSR 00400
 #define S_IWUSR 00200
@@ -189,6 +191,8 @@
         
         if( data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY ) {
             ret.st_mode=S_IFDIR;
+        } else if( data.dwFileAttributes&FILE_ATTRIBUTE_REPARSE_POINT ) {
+            ret.st_mode=S_IFLNK;
         } else {
             ret.st_mode=S_IFREG;
         }
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Rsyncrypto-devel mailing list
Rsyncrypto-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel

Reply via email to