dotless/dotless — Issue #147: Issue with @import
Author: steveoh
Created: 2012-03-06 00:03:59+00:00
State: open

I can't import a file located outside of my project. I like to keep my 3rd party libraries in a libs folder. I am trying to do

@import "\..\..\..\..\..\libs\twitter\bootstrap"

I was able to modify

namespace dotless.Core.Input
{
using System.Web;
using System.IO;

public class AspServerPathResolver : IPathResolver
{
public string GetFullPath(string path)
{
try
{
return HttpContext.Current.Server.MapPath(path);
}
catch (HttpException)
{
}

path = path.Replace("/", "\\");
return Path.Combine(HttpContext.Current.Request.PhysicalPath, path);
}
}
}

Is this something you would want as a pull request or does it break other things? All the unit tests pass.