The attribute copy operation was nested inside a conditional block which wouldn't be executed if the file being copied was zero bytes in length. Moved outside the block to where permissions and other optional operations are handled. This fixes bug #2259.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26013 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -440,10 +440,6 @@ copy_reg (char const *src_name, char const *dst_name,
|
||||
#endif
|
||||
}
|
||||
|
||||
if (x->ignore_attributes == 0
|
||||
&& copy_attributes(source_desc, dest_desc) != 0)
|
||||
fprintf(stderr, "%s: could not copy attributes\n", src_name);
|
||||
|
||||
/* If not making a sparse file, try to use a more-efficient
|
||||
buffer size. */
|
||||
if (! make_holes)
|
||||
@@ -644,6 +640,11 @@ copy_reg (char const *src_name, char const *dst_name,
|
||||
}
|
||||
}
|
||||
|
||||
if (x->ignore_attributes == 0
|
||||
&& copy_attributes(source_desc, dest_desc) != 0)
|
||||
fprintf(stderr, "%s: could not copy attributes\n", src_name);
|
||||
|
||||
|
||||
close_src_and_dst_desc:
|
||||
if (close (dest_desc) < 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user