diff -ur rsync-3.0.6/cleanup.c rsync-3.0.6~/cleanup.c
--- rsync-3.0.6/cleanup.c	2009-01-17 22:41:35.000000000 +0100
+++ rsync-3.0.6~/cleanup.c	2009-05-23 11:07:47.039575300 +0200
@@ -34,6 +34,10 @@
 static struct sigaction sigact;
 #endif
 
+#ifdef USE_VSS
+#include "vss/vss.h"
+#endif
+
 /**
  * Close all open sockets and files, allowing a (somewhat) graceful
  * shutdown() of socket connections.  This eliminates the abortive
@@ -124,6 +128,10 @@
 		/* FALLTHROUGH */
 #include "case_N.h"
 
+#ifdef USE_VSS
+	deinitialize_vss();
+#endif
+
 		if (cleanup_child_pid != -1) {
 			int status;
 			int pid = wait_process(cleanup_child_pid, &status, WNOHANG);
diff -ur rsync-3.0.6/proto.h rsync-3.0.6~/proto.h
--- rsync-3.0.6/proto.h	2009-06-01 16:15:55.976141600 +0200
+++ rsync-3.0.6~/proto.h	2009-05-22 09:56:44.549642800 +0200
@@ -295,6 +295,7 @@
 void start_accept_loop(int port, int (*fn)(int, int));
 void set_socket_options(int fd, char *options);
 int sock_exec(const char *prog);
+void convert_to_vss_path(const char* path, char* vssPath);
 int do_unlink(const char *fname);
 int do_symlink(const char *fname1, const char *fname2);
 int do_link(const char *fname1, const char *fname2);
diff -ur rsync-3.0.6/sender.c rsync-3.0.6~/sender.c
--- rsync-3.0.6/sender.c	2009-04-12 21:48:59.000000000 +0200
+++ rsync-3.0.6~/sender.c	2009-05-23 11:07:55.320878300 +0200
@@ -308,6 +308,20 @@
 			exit_cleanup(RERR_PROTOCOL);
 		}
 
+#if defined(USE_VSS)
+		if (st.st_size == 0)
+		{
+			if (do_stat(fname, &st) != 0)
+			{
+				io_error |= IOERR_GENERAL;
+				rsyserr(FERROR, errno, "fstat failed");
+				free_sums(s);
+				close(fd);
+				return;
+			}
+		}
+#endif
+
 		if (st.st_size) {
 			int32 read_size = MAX(s->blength * 3, MAX_MAP_SIZE);
 			mbuf = map_file(fd, st.st_size, read_size, s->blength);
diff -ur rsync-3.0.6/syscall.c rsync-3.0.6~/syscall.c
--- rsync-3.0.6/syscall.c	2009-06-01 16:15:55.991766700 +0200
+++ rsync-3.0.6~/syscall.c	2009-06-01 16:00:02.970042400 +0200
@@ -29,6 +29,23 @@
 #include <sys/attr.h>
 #endif
 
+#if defined(USE_VSS)
+#include <windows.h>
+#include <sys/cygwin.h>
+#include "vss/vss.h"
+
+extern int module_id;
+
+void convert_to_vss_path(const char* path, char* vssPath)
+{
+	char originalPath[MAX_PATH];
+	cygwin_conv_to_full_win32_path(path, originalPath);
+	strcpy(originalPath, originalPath + 2);
+	sprintf(vssPath, "%s\\%s", g_vssVolume, originalPath);
+}
+
+#endif
+
 extern int dry_run;
 extern int am_root;
 extern int read_only;
@@ -138,6 +155,27 @@
 
 int do_open(const char *pathname, int flags, mode_t mode)
 {
+#if defined(USE_VSS)
+	if (flags == O_RDONLY && mode == 0)
+	{
+		if (!g_vssInitialized)
+		{
+			if (!initialize_vss(lp_path(module_id)))
+				exit_cleanup(1);
+		}
+
+		char modifiedPath[MAX_PATH * 2];
+		convert_to_vss_path(pathname, modifiedPath);
+		HANDLE file = CreateFile(modifiedPath, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
+		if (file != INVALID_HANDLE_VALUE)
+		{
+			int fd = cygwin_attach_handle_to_fd(0, -1, file, 0, 0);
+			if (fd != -1)
+				return fd;
+		}
+	}
+#endif
+
 	if (flags != O_RDONLY) {
 		RETURN_ERROR_IF(dry_run, 0);
 		RETURN_ERROR_IF_RO_OR_LO;
@@ -240,6 +278,20 @@
 
 int do_stat(const char *fname, STRUCT_STAT *st)
 {
+#if defined(USE_VSS)
+	char modifiedPath[MAX_PATH * 2];
+	convert_to_vss_path(fname, modifiedPath);
+
+#ifdef USE_STAT64_FUNCS
+	int ret = stat64(modifiedPath, st);
+#else
+	int ret = stat(modifiedPath, st);
+#endif
+
+	if (ret != -1)
+		return ret;
+#endif
+
 #ifdef USE_STAT64_FUNCS
 	return stat64(fname, st);
 #else

