mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 06:56:28 -05:00
Fixes the Windows regression test.
This commit is contained in:
parent
71ff0620ce
commit
ea4eafb60d
2 changed files with 5 additions and 4 deletions
|
|
@ -125,7 +125,7 @@ unsigned char* file_read(const char* path, int size, int extra_alloc)
|
|||
|
||||
data = malloc(size + extra_alloc);
|
||||
|
||||
f = open(path, O_RDONLY);
|
||||
f = open(path, O_RDONLY | O_BINARY);
|
||||
if (f < 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
fprintf(stderr, "Error opening file %s\n", path);
|
||||
|
|
@ -154,7 +154,7 @@ void file_write(const char* path, const unsigned char* data, int size, struct st
|
|||
{
|
||||
int f;
|
||||
|
||||
f = creat(path, S_IRUSR | S_IWUSR);
|
||||
f = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_NOFOLLOW, 0600);
|
||||
if (f < 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
fprintf(stderr, "Error creating file %s\n", path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue