Skip to content

[CLOSED] Fix a case when extension less file is importing other less files #6535

@core-ai-bot

Description

@core-ai-bot

Issue by zaggino
Tuesday Mar 18, 2014 at 12:22 GMT
Originally opened as adobe/brackets#7230


I wanted to split less file my extension is using into more files, but loading failed when using valid import directives. Through debugging, I found out that some properties of file info were not filled as it should.

These are the values for file brackets.less:

currentDirectory: "file:///D:/Program%20Files/Brackets/dev/src/styles/"
entryPath:        "file:///D:/Program%20Files/Brackets/dev/src/styles/"
filename:         "file:///D:/Program%20Files/Brackets/dev/src/styles/brackets.less"
relativeUrls:     undefined
rootFilename:     "file:///D:/Program%20Files/Brackets/dev/src/styles/brackets.less"
rootpath:         "file:///D:/Program%20Files/Brackets/dev/src/styles/"

And these are the original values calculated for brackets-git.less:

currentDirectory: ""
entryPath:        ""
filename:         "brackets-git.less"
relativeUrls:     undefined
rootFilename:     "brackets-git.less"
rootpath:         "file:///C:/Users/Zaggi/AppData/Roaming/Brackets/extensions/user/zaggino.brackets-git/less/"

The fix makes fileInfo look the same way as in the brackets.less case and all references are loaded correctly.


zaggino included the following code: https://github.com/adobe/brackets/pull/7230/commits

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions