Skip to content

Emmet: show error when the path is located outside the current workspace - #8586

Closed
Denis Malinochkin (mrmlnc) wants to merge 2 commits into
microsoft:masterfrom
mrmlnc:fix-8569
Closed

Denis Malinochkin (mrmlnc) wants to merge 2 commits into
microsoft:masterfrom
mrmlnc:fix-8569

Conversation

@mrmlnc

@mrmlnc Denis Malinochkin (mrmlnc) commented Jun 30, 2016 •

Copy link
Copy Markdown
Contributor

Source: #8569

Description

Just show error when the path is located outside the current workspace.

image

About createPath function

It's not necessary to check. The function createPath only used in base64.js action:

var absPath = file.createPath(editor.getFilePath(), filePath);

The method (editor.getFilePath()) always returns the real path to the file.

public getFilePath(): string {
    return this.editor.getModel().uri.fsPath;
}

@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified Erich Gamma (@egamma) to be a potential reviewer

@msftclas

Hi Denis Malinochkin (@mrmlnc), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@mrmlnc

Denis Malinochkin (mrmlnc) commented Jun 30, 2016 •

Copy link
Copy Markdown
Contributor Author

This is the last PR for Emmet, so now you can take a rest from my bad English. 😝 I’m working on improving my English.

@egamma Erich Gamma (egamma) added this to the July 2016 milestone Jun 30, 2016
@egamma

Copy link
Copy Markdown
Member

Denis Malinochkin (@mrmlnc) thanks, please notice that I've remove the fileAccessor module in the latest. Since this code is only needed by base64.js I've moved the helper there. Can you pls review and adjust this PR.

I also wonder whether we should use the IFileService.

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants