Fix hfs_receiver_check() on a relative path.
[rsync.git/patches.git] / hfs-compression.diff
index b96cab4b9c2b3d633546b1f32cd713050d0ecc7a..ba9410e2c8c508f12b2d956cca63081a73bf986a 100644 (file)
@@ -173,7 +173,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;
@@ -185,8 +185,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);
 +      }
 +
@@ -198,7 +198,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);
 +      }
 +
@@ -217,7 +217,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;
                }
@@ -228,7 +228,7 @@ diff --git a/main.c b/main.c
                }
 -
 +#ifdef SUPPORT_HFS_COMPRESSION
-+              hfs_receiver_check(dest_path);
++              hfs_receiver_check();
 +#endif
                return NULL;
        }
@@ -238,7 +238,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 = '/';