From f56537a20b6b389476ead500cd23785a986b2bab Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 28 Mar 2009 09:56:49 +0000 Subject: [PATCH] bad results on gcc with const char* -> char* conversion git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5957 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/util.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/util.cpp b/Source/util.cpp index f06ee192..2c0b07f0 100644 --- a/Source/util.cpp +++ b/Source/util.cpp @@ -328,15 +328,19 @@ void my_convert_free(char *converted_path) int my_open(const char *pathname, int flags) { - PATH_CONVERT(pathname); - int result = open(pathname, flags); + char *converted_pathname = my_convert(pathname); + + int result = open(converted_pathname, flags); + my_convert_free(converted_pathname); return result; } FILE *my_fopen(const char *path, const char *mode) { - PATH_CONVERT(path); - FILE *result = fopen(path, mode); + char *converted_path = my_convert(path); + + FILE *result = fopen(converted_path, mode); + my_convert_free(converted_path); return result; } #endif//!_WIN32