mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 18:08:29 +00:00
a/util: Read config files in binary mode to fix on Windows
This commit is contained in:
parent
6fddf3103d
commit
fec1d42139
|
@ -54,7 +54,7 @@ u_config_json_open_or_create_file(struct u_config_json *json, const char *filena
|
|||
return;
|
||||
}
|
||||
|
||||
FILE *file = u_file_open_file_in_config_dir(filename, "r");
|
||||
FILE *file = u_file_open_file_in_config_dir(filename, "rb");
|
||||
if (file == NULL) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ u_file_read_content(FILE *file)
|
|||
char *
|
||||
u_file_read_content_from_path(const char *path)
|
||||
{
|
||||
FILE *file = fopen(path, "r");
|
||||
FILE *file = fopen(path, "rb");
|
||||
if (file == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue