[dd3271]: apr / binary-copy.patch Maximize Restore History

Download this file

binary-copy.patch    32 lines (23 with data), 1.0 kB

 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
From: David Rothenberger <d.rothenberger@entomo.com>
---
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;
@@ -46,7 +46,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;