diff options
author | Vincent Torri <vincent dot torri at gmail dot com> | 2015-12-03 09:32:39 +0100 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2015-12-05 21:04:36 +0100 |
commit | 3b44645363dcdd561edd9610a64f3d2c382753a9 (patch) | |
tree | 64f6c4a580e563e79ca3f1867ae510025052fd64 /src/lib/efreet | |
parent | d2a7882b732b4cc3a8e7b11ec1c4336bdc2029bb (diff) | |
download | efl-3b44645363dcdd561edd9610a64f3d2c382753a9.tar.gz |
efl: add binary mode to f(re)open() calls
This allows better compatibility with Windows
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/efreet')
-rw-r--r-- | src/lib/efreet/efreet_menu.c | 2 | ||||
-rw-r--r-- | src/lib/efreet/efreet_mime.c | 2 | ||||
-rw-r--r-- | src/lib/efreet/efreet_trash.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/efreet/efreet_menu.c b/src/lib/efreet/efreet_menu.c index ada789b7e0..b774460c98 100644 --- a/src/lib/efreet/efreet_menu.c +++ b/src/lib/efreet/efreet_menu.c @@ -687,7 +687,7 @@ efreet_menu_save(Efreet_Menu *menu, const char *path) EINA_SAFETY_ON_NULL_RETURN_VAL(menu, 0); EINA_SAFETY_ON_NULL_RETURN_VAL(path, 0); - f = fopen(path, "w"); + f = fopen(path, "wb"); if (!f) return 0; fprintf(f, "<?xml version=\"1.0\"?>\n"); fprintf(f, "<!DOCTYPE Menu PUBLIC \"-//freedesktop//DTD Menu 1.0//EN\" " diff --git a/src/lib/efreet/efreet_mime.c b/src/lib/efreet/efreet_mime.c index 23d86cfd3f..adfa79053a 100644 --- a/src/lib/efreet/efreet_mime.c +++ b/src/lib/efreet/efreet_mime.c @@ -752,7 +752,7 @@ efreet_mime_fallback_check(const char *file) if (ecore_file_can_exec(file)) return _mime_application_x_executable; - if (!(f = fopen(file, "r"))) return NULL; + if (!(f = fopen(file, "rb"))) return NULL; i = fread(buf, 1, sizeof(buf), f); fclose(f); diff --git a/src/lib/efreet/efreet_trash.c b/src/lib/efreet/efreet_trash.c index 50a273b811..5d9fd25979 100644 --- a/src/lib/efreet/efreet_trash.c +++ b/src/lib/efreet/efreet_trash.c @@ -215,7 +215,7 @@ efreet_trash_delete_uri(Efreet_Uri *uri, int force_delete) /* create info file */ snprintf(dest, sizeof(dest), "%s/info/%s.trashinfo", trash_dir, fname); - if ((f = fopen(dest, "w"))) + if ((f = fopen(dest, "wb"))) { fputs("[Trash Info]\n", f); |