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 086771a commit 2c8c2abCopy full SHA for 2c8c2ab
document.cpp
@@ -29,8 +29,15 @@ namespace Sass {
29
Document Document::make_from_file(Context& ctx, string path)
30
{
31
std::FILE *f;
32
- f = std::fopen(path.c_str(), "rb");
33
- if (!f) throw path;
+ const char* path_str = path.c_str();
+ f = std::fopen(path_str, "rb");
34
+ if (!f) {
35
+ const char* file_name_str = Prelexer::folders(path_str);
36
+ f = std::fopen((Token::make(path_str, file_name_str).to_string() +
37
+ "_" +
38
+ Token::make(file_name_str).to_string()).c_str(), "rb");
39
+ if (!f) throw path;
40
+ }
41
if (std::fseek(f, 0, SEEK_END)) throw path;
42
int status = std::ftell(f);
43
if (status < 0) throw path;
0 commit comments