diff options
author | Jim Meyering <jim@meyering.net> | 1998-08-15 21:16:34 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-08-15 21:16:34 +0000 |
commit | 0d3386199962a2ccc290223292716e3ee8fc2c37 (patch) | |
tree | ed23d3a26242b3a12cfc72007939d9bf476f116b /src | |
parent | 9c38d004ec05e1663603acc4acefc5a2d350a460 (diff) | |
download | coreutils-0d3386199962a2ccc290223292716e3ee8fc2c37.tar.xz |
(copy_internal) [one-file-system]: Do copy mount point
directories (but none of their entries). This makes
`cp --one-file-system' work the same way tar does.
From Marty Leisner.
Diffstat (limited to 'src')
-rw-r--r-- | src/copy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/copy.c b/src/copy.c index 3be9d3825..8c5ae54e7 100644 --- a/src/copy.c +++ b/src/copy.c @@ -381,10 +381,6 @@ copy_internal (const char *src_path, const char *dst_path, return 1; } - /* Are we crossing a file system boundary? */ - if (x->one_file_system && device != 0 && device != src_sb.st_dev) - return 0; - /* We wouldn't insert a node unless nlink > 1, except that we need to find created files so as to not copy infinitely if a directory is copied into itself. */ @@ -661,6 +657,10 @@ copy_internal (const char *src_path, const char *dst_path, if (x->verbose) printf ("%s -> %s\n", src_path, dst_path); + + /* Are we crossing a file system boundary? */ + if (x->one_file_system && device != 0 && device != src_sb.st_dev) + return 0; } /* Copy the contents of the directory. */ |