Skip to content

Commit a561f12

Browse files
author
Aaron Leung
committed
Merge pull request #329 from nzbart/windows_cwd_fix
Convert Windows backslashes into forward slashes on Windows when retrieving cwd
2 parents b29f50b + ef3eadb commit a561f12

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

context.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ namespace Sass {
281281
char wd[wd_len];
282282
string cwd = getcwd(wd, wd_len);
283283
if (cwd[cwd.length() - 1] != '/') cwd += '/';
284+
#ifdef _WIN32
285+
replace(begin(cwd), end(cwd), '\\', '/'); //convert Windows backslashes to URL forward slashes
286+
#endif
284287
return cwd;
285288
}
286289

0 commit comments

Comments
 (0)