Skip to content

Commit be20a61

Browse files
committed
Fix resolve_relative_path for absolute windows paths
They wrongly were seen as urls (protocol vs drive letter)
1 parent 6d5b6b2 commit be20a61

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/file.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,9 @@ namespace Sass {
215215
if (proto && uri[proto] == ':') ++ proto;
216216
}
217217

218-
if (proto && uri[proto++] == '/') return uri;
218+
// distinguish between windows absolute paths and valid protocols
219+
// we assume that protocols must at least have two chars to be valid
220+
if (proto && uri[proto++] == '/' && proto > 3) return uri;
219221

220222
#ifdef _WIN32
221223
// absolute link must have a drive letter, and we know that we

0 commit comments

Comments
 (0)