@@ -1195,7 +1195,7 @@ inline int permission_flags(std::ios::openmode mode) {
1195
1195
}
1196
1196
1197
1197
template < class charT , class traits = std::char_traits< charT>>
1198
- __gnu_cxx::stdio_filebuf<charT, traits> open_filebuf (const path& file_path, std::ios::openmode mode) {
1198
+ __gnu_cxx::stdio_filebuf<charT, traits> open_filebuf_from_unicode_path (const path& file_path, std::ios::openmode mode) {
1199
1199
// Opening a file handle/descriptor from the native (wide) string path.
1200
1200
int file_handle = 0 ;
1201
1201
_wsopen_s (&file_handle, GHC_NATIVEWP (file_path), open_flags (mode), _SH_DENYNO, permission_flags (mode));
@@ -1236,7 +1236,7 @@ class basic_filebuf : public std::basic_filebuf<charT, traits>
1236
1236
if (this ->is_open ()) {
1237
1237
return nullptr ;
1238
1238
}
1239
- auto filebuf = detail::open_filebuf <charT, traits>(p, mode);
1239
+ auto filebuf = detail::open_filebuf_from_unicode_path <charT, traits>(p, mode);
1240
1240
if (!filebuf.is_open ()) {
1241
1241
return nullptr ;
1242
1242
}
@@ -1266,7 +1266,7 @@ class basic_ifstream : public std::basic_ifstream<charT, traits>
1266
1266
}
1267
1267
void open (const path& p, std::ios_base::openmode mode = std::ios_base::in)
1268
1268
{
1269
- *this ->rdbuf () = detail::open_filebuf <charT, traits>(p, mode | std::ios_base::in);
1269
+ *this ->rdbuf () = detail::open_filebuf_from_unicode_path <charT, traits>(p, mode | std::ios_base::in);
1270
1270
if (!this ->is_open ()) {
1271
1271
this ->setstate (std::ios_base::failbit);
1272
1272
} else {
@@ -1303,7 +1303,7 @@ class basic_ofstream : public std::basic_ofstream<charT, traits>
1303
1303
}
1304
1304
void open (const path& p, std::ios_base::openmode mode = std::ios_base::out)
1305
1305
{
1306
- *this ->rdbuf () = detail::open_filebuf <charT, traits>(p, mode | std::ios_base::out);
1306
+ *this ->rdbuf () = detail::open_filebuf_from_unicode_path <charT, traits>(p, mode | std::ios_base::out);
1307
1307
if (!this ->is_open ()) {
1308
1308
this ->setstate (std::ios_base::failbit);
1309
1309
} else {
@@ -1340,7 +1340,7 @@ class basic_fstream : public std::basic_fstream<charT, traits>
1340
1340
}
1341
1341
void open (const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out)
1342
1342
{
1343
- *this ->rdbuf () = detail::open_filebuf <charT, traits>(p, mode | std::ios_base::in | std::ios_base::out);
1343
+ *this ->rdbuf () = detail::open_filebuf_from_unicode_path <charT, traits>(p, mode | std::ios_base::in | std::ios_base::out);
1344
1344
if (!this ->is_open ()) {
1345
1345
this ->setstate (std::ios_base::failbit);
1346
1346
} else {
0 commit comments