forked from msys2/MSYS2-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinary-copy.patch
31 lines (23 loc) · 1.01 KB
/
binary-copy.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: David Rothenberger <[email protected]>
---
file_io/unix/copy.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/file_io/unix/copy.c b/file_io/unix/copy.c
index df3a49c..aa2836f 100644
--- a/file_io/unix/copy.c
+++ b/file_io/unix/copy.c
@@ -29,7 +29,7 @@ static apr_status_t apr_file_transfer_contents(const char *from_path,
apr_fileperms_t perms;
/* Open source file. */
- status = apr_file_open(&s, from_path, APR_FOPEN_READ, APR_OS_DEFAULT, pool);
+ status = apr_file_open(&s, from_path, APR_FOPEN_READ | APR_FOPEN_BINARY, APR_OS_DEFAULT, pool);
if (status)
return status;
@@ -47,7 +47,7 @@ static apr_status_t apr_file_transfer_contents(const char *from_path,
perms = to_perms;
/* Open dest file. */
- status = apr_file_open(&d, to_path, flags, perms, pool);
+ status = apr_file_open(&d, to_path, flags | APR_FOPEN_BINARY, perms, pool);
if (status) {
apr_file_close(s); /* toss any error */
return status;