-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from ZOSOpenTools/fix_copy
Fix copy: Use stat instead of fstat and move copytags call before write
- Loading branch information
Showing
2 changed files
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm | ||
index 1dc1d2d95c..6210af4cbe 100644 | ||
index 1dc1d2d95c..4cab268469 100644 | ||
--- a/lib/File/Copy.pm | ||
+++ b/lib/File/Copy.pm | ||
@@ -180,6 +180,11 @@ sub copy { | ||
} | ||
@@ -168,6 +168,11 @@ sub copy { | ||
$closeto = 1; | ||
} | ||
|
||
+ # Copy file tags on os390 | ||
+ if ($^O eq 'os390') { | ||
+ ZOS::Filespec::copytags(fileno($from_h), fileno($to_h)); | ||
+ ZOS::Filespec::copytags_fd(fileno($from_h), fileno($to_h)); | ||
+ } | ||
+ | ||
close($to_h) || goto fail_open2 if $closeto; | ||
close($from_h) || goto fail_open1 if $closefrom; | ||
|
||
$! = 0; | ||
for (;;) { | ||
my ($r, $w, $t); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters