From 47c3b5d2b03d3286cba2a3b4890e57fdd6135132 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 17 Sep 2016 00:28:00 +0200 Subject: Fix ICE-4787 - slice compilers and unicode paths --- cpp/src/slice2confluence/Gen.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'cpp/src/slice2confluence/Gen.cpp') diff --git a/cpp/src/slice2confluence/Gen.cpp b/cpp/src/slice2confluence/Gen.cpp index 88eda488445..98234547210 100644 --- a/cpp/src/slice2confluence/Gen.cpp +++ b/cpp/src/slice2confluence/Gen.cpp @@ -1780,8 +1780,7 @@ void Slice::GeneratorBase::makeDir(const string& dir) { struct stat st; - int rc = stat(dir.c_str(), &st); - if(rc == 0) + if(!IceUtilInternal::stat(dir, &st)) { if(!(st.st_mode & S_IFDIR)) { @@ -1793,12 +1792,7 @@ Slice::GeneratorBase::makeDir(const string& dir) return; } -#ifdef _WIN32 - rc = _mkdir(dir.c_str()); -#else - rc = mkdir(dir.c_str(), S_IRWXU | S_IRWXG | S_IRWXO); -#endif - if(rc != 0) + if(IceUtilInternal::mkdir(dir, 0777) != 0) { ostringstream os; os << "cannot create directory `" << dir << "': " << strerror(errno); -- cgit v1.2.3