We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c87e39e commit 16e48a8Copy full SHA for 16e48a8
src/file.cpp
@@ -55,10 +55,14 @@ namespace Sass {
55
const size_t wd_len = 4096;
56
#ifndef _WIN32
57
char wd[wd_len];
58
- std::string cwd = getcwd(wd, wd_len);
+ char* pwd = getcwd(wd, wd_len);
59
+ if (pwd == NULL) throw Exception::OperationError("cwd gone missing");
60
+ std::string cwd = pwd;
61
#else
62
wchar_t wd[wd_len];
- std::string cwd = wstring_to_string(_wgetcwd(wd, wd_len));
63
+ wchar_t* pwd = _wgetcwd(wd, wd_len);
64
65
+ std::string cwd = wstring_to_string(pwd);
66
//convert backslashes to forward slashes
67
replace(cwd.begin(), cwd.end(), '\\', '/');
68
#endif
0 commit comments