File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,20 @@ namespace Sass {
3232 const char * path_str = path.c_str ();
3333 f = std::fopen (path_str, " rb" );
3434 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;
35+ string path_with_extension (path + " .scss" );
36+ f = std::fopen (path_with_extension.c_str (), " rb" );
37+ if (!f) {
38+ const char * file_name_str = Prelexer::folders (path_str);
39+ string path_with_underscore (Token::make (path_str, file_name_str).to_string () +
40+ " _" +
41+ Token::make (file_name_str).to_string ());
42+ f = std::fopen (path_with_underscore.c_str (), " rb" );
43+ if (!f) {
44+ string path_with_underscore_and_extension (path_with_underscore + " .scss" );
45+ f = std::fopen (path_with_underscore_and_extension.c_str (), " rb" );
46+ if (!f) throw path;
47+ }
48+ }
4049 }
4150 if (std::fseek (f, 0 , SEEK_END)) throw path;
4251 int status = std::ftell (f);
You can’t perform that action at this time.
0 commit comments