@@ -81,7 +81,10 @@ namespace Sass {
81
81
wchar_t resolved[32768 ];
82
82
// windows unicode filepaths are encoded in utf16
83
83
std::string abspath (join_paths (get_cwd (), path));
84
- std::wstring wpath (UTF_8::convert_to_utf16 (" \\\\ ?\\ " + abspath));
84
+ if (!(abspath[0 ] == ' /' && abspath[1 ] == ' /' )) {
85
+ abspath = " //?/" + abspath;
86
+ }
87
+ std::wstring wpath (UTF_8::convert_to_utf16 (abspath));
85
88
std::replace (wpath.begin (), wpath.end (), ' /' , ' \\ ' );
86
89
DWORD rv = GetFullPathNameW (wpath.c_str (), 32767 , resolved, NULL );
87
90
if (rv > 32767 ) throw Exception::OperationError (" Path is too long" );
@@ -434,7 +437,10 @@ namespace Sass {
434
437
wchar_t resolved[32768 ];
435
438
// windows unicode filepaths are encoded in utf16
436
439
std::string abspath (join_paths (get_cwd (), path));
437
- std::wstring wpath (UTF_8::convert_to_utf16 (" \\\\ ?\\ " + abspath));
440
+ if (!(abspath[0 ] == ' /' && abspath[1 ] == ' /' )) {
441
+ abspath = " //?/" + abspath;
442
+ }
443
+ std::wstring wpath (UTF_8::convert_to_utf16 (abspath));
438
444
std::replace (wpath.begin (), wpath.end (), ' /' , ' \\ ' );
439
445
DWORD rv = GetFullPathNameW (wpath.c_str (), 32767 , resolved, NULL );
440
446
if (rv > 32767 ) throw Exception::OperationError (" Path is too long" );
0 commit comments