Skip to content
Snippets Groups Projects
Commit e966c17b authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'FStream-win-ext-path'


edd8b5e0 FStream: Open files on Windows using UNC path

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !27
parents b5ca6e51 edd8b5e0
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@ public:
typedef std::basic_filebuf<CharType, Traits> my_base_type;
basic_filebuf* open(char const* s, std::ios_base::openmode mode)
{
const std::wstring wstr = Encoding::ToWide(s);
const std::wstring wstr = Encoding::ToWindowsExtendedPath(s);
return static_cast<basic_filebuf*>(my_base_type::open(wstr.c_str(), mode));
}
#endif
......@@ -93,7 +93,7 @@ public:
#if defined(_MSC_VER)
const bool success = buf_->open(file_name, mode) != 0;
#else
const std::wstring wstr = Encoding::ToWide(file_name);
const std::wstring wstr = Encoding::ToWindowsExtendedPath(file_name);
bool success = false;
std::wstring cmode = getcmode(mode);
file_ = _wfopen(wstr.c_str(), cmode.c_str());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment