mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0029081: With Mingw-w64 Unicode Paths Do Not Work
OSD_OpenStream() now uses __gnu_cxx::stdio_filebuf extension for opening UNICODE files on MinGW when using C++ file streams. Variant accepting filebuf returns bool (true if succeeded and false otherwise). Checks of ofstream to be opened made via calls to low-level ofstream::rdbuf() are replaced by calls to ofstream::is_open(); state of the stream is also checked (to be good). Unicode name used for test file in test bugs fclasses bug22125 is described (for possibility to check it).
This commit is contained in:
@@ -789,7 +789,8 @@ Standard_Boolean BRepTools::Write(const TopoDS_Shape& Sh,
|
||||
{
|
||||
ofstream os;
|
||||
OSD_OpenStream(os, File, ios::out);
|
||||
if (!os.rdbuf()->is_open()) return Standard_False;
|
||||
if (!os.is_open() || !os.good())
|
||||
return Standard_False;
|
||||
|
||||
Standard_Boolean isGood = (os.good() && !os.eof());
|
||||
if(!isGood)
|
||||
|
Reference in New Issue
Block a user