File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ namespace Sass {
234
234
235
235
sass::string path_for_console (const sass::string& rel_path, const sass::string& abs_path, const sass::string& orig_path)
236
236
{
237
- // magic algorith goes here!!
237
+ // magic algorithm goes here!!
238
238
239
239
// if the file is outside this directory show the absolute path
240
240
if (rel_path.substr (0 , 3 ) == " ../" ) {
@@ -247,7 +247,15 @@ namespace Sass {
247
247
// create an absolute path by resolving relative paths with cwd
248
248
sass::string rel2abs (const sass::string& path, const sass::string& base, const sass::string& cwd)
249
249
{
250
- return make_canonical_path (join_paths (join_paths (cwd + " /" , base + " /" ), path));
250
+ sass::string rv = make_canonical_path (join_paths (join_paths (cwd + " /" , base + " /" ), path));
251
+ #ifdef _WIN32
252
+ // On windows we may get an absolute path without directory
253
+ // In that case we should prepend the directory from the root
254
+ if (rv[0 ] == ' /' && rv[1 ] != ' /' ) {
255
+ rv.insert (0 , cwd, 0 , 2 );
256
+ }
257
+ #endif
258
+ return rv;
251
259
}
252
260
253
261
// create a path that is relative to the given base directory
You can’t perform that action at this time.
0 commit comments