Fix hfs_receiver_check() on a relative path.
authorWayne Davison <wayned@samba.org>
Mon, 4 Jul 2011 22:34:09 +0000 (15:34 -0700)
committerWayne Davison <wayned@samba.org>
Mon, 4 Jul 2011 22:34:09 +0000 (15:34 -0700)
hfs-compression.diff

index 6c034e1..3cfef23 100644 (file)
@@ -191,7 +191,7 @@ diff --git a/main.c b/main.c
  }
  
 +#ifdef SUPPORT_HFS_COMPRESSION
-+static void hfs_receiver_check(const char *dest_path)
++static void hfs_receiver_check(void)
 +{
 +      struct statfs fsb;
 +      struct attrlist attrs;
@@ -203,8 +203,8 @@ diff --git a/main.c b/main.c
 +      if (preserve_hfs_compression != 1)
 +              return; /* Nothing to check if --hfs-compression option isn't enabled. */
 +
-+      if (statfs(dest_path, &fsb) < 0) {
-+              rsyserr(FERROR, errno, "statfs %s failed", full_fname(dest_path));
++      if (statfs(".", &fsb) < 0) {
++              rsyserr(FERROR, errno, "statfs %s failed", curr_dir);
 +              exit_cleanup(RERR_FILESELECT);
 +      }
 +
@@ -216,7 +216,7 @@ diff --git a/main.c b/main.c
 +      attrData.len = sizeof attrData;
 +
 +      if (getattrlist(fsb.f_mntonname, &attrs, &attrData, sizeof attrData, 0) < 0) {
-+              rsyserr(FERROR, errno, "getattrlist %s failed", full_fname(dest_path));
++              rsyserr(FERROR, errno, "getattrlist %s failed", curr_dir);
 +              exit_cleanup(RERR_FILESELECT);
 +      }
 +
@@ -235,7 +235,7 @@ diff --git a/main.c b/main.c
                        }
                        filesystem_dev = st.st_dev; /* ensures --force works right w/-x */
 +#ifdef SUPPORT_HFS_COMPRESSION
-+                      hfs_receiver_check(dest_path);
++                      hfs_receiver_check();
 +#endif
                        return NULL;
                }
@@ -246,7 +246,7 @@ diff --git a/main.c b/main.c
                }
 -
 +#ifdef SUPPORT_HFS_COMPRESSION
-+              hfs_receiver_check(dest_path);
++              hfs_receiver_check();
 +#endif
                return NULL;
        }
@@ -256,7 +256,7 @@ diff --git a/main.c b/main.c
                exit_cleanup(RERR_FILESELECT);
        }
 +#ifdef SUPPORT_HFS_COMPRESSION
-+      hfs_receiver_check(dest_path);
++      hfs_receiver_check();
 +#endif
        *cp = '/';