1
0
mirror of https://github.com/adobe/brackets.git synced 2024-11-20 01:42:55 +01:00

Merge pull request #15096 from niteskum/WinPathIssueWithExtEditor

Path is converted to windows style when opening with external editor in win
This commit is contained in:
Nitesh Kumar 2020-03-20 00:28:53 +05:30 committed by GitHub
commit b4abc5ae74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,9 +48,16 @@ define(function (require, exports, module) {
var extensionToExtApplicationMap = {};
function convertUnixPathToWindowsPath(path) {
if (brackets.platform === "win" && path && path[1] === ":" && path[2] === "/") {
path = path.replace(RegExp('/','g'), '\\');
}
return path;
}
function _openWithExternalApplication(event, path) {
_nodeDomain.exec("open", {
path: path,
path: convertUnixPathToWindowsPath(path),
app: extensionToExtApplicationMap[FileUtils.getFileExtension(path).toLowerCase()]
});
}