git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@2230 77e5149b-7576-45b1-b177-96237e5ba77b
Tomasz Kojm authored on 2006/09/03 03:59:48... | ... |
@@ -89,6 +89,11 @@ static pthread_mutex_t cli_gentempname_mutex = PTHREAD_MUTEX_INITIALIZER; |
89 | 89 |
#define O_BINARY 0 |
90 | 90 |
#endif |
91 | 91 |
|
92 |
+#ifdef C_WINDOWS |
|
93 |
+#undef P_tmpdir |
|
94 |
+#define P_tmpdir "C:\\WINDOWS\\TEMP" |
|
95 |
+#endif |
|
96 |
+ |
|
92 | 97 |
#define CL_FLEVEL 8 /* don't touch it */ |
93 | 98 |
|
94 | 99 |
short cli_debug_flag = 0, cli_leavetemps_flag = 0; |
... | ... |
@@ -775,7 +780,7 @@ int cli_filecopy(const char *src, const char *dest) |
775 | 775 |
int s, d, bytes; |
776 | 776 |
|
777 | 777 |
|
778 |
- if((s = open(src, O_RDONLY)) == -1) |
|
778 |
+ if((s = open(src, O_RDONLY|O_BINARY)) == -1) |
|
779 | 779 |
return -1; |
780 | 780 |
|
781 | 781 |
if((d = open(dest, O_CREAT|O_WRONLY|O_TRUNC|O_BINARY, S_IRWXU)) == -1) { |