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

Merge pull request #15100 from niteskum/windowsPathCorrection

Windows path correction
This commit is contained in:
Nitesh Kumar 2020-03-24 12:03:45 +05:30 committed by GitHub
commit f37493fde6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,7 @@ define(function (require, exports, module) {
ExtensionUtils = brackets.getModule("utils/ExtensionUtils"),
NodeDomain = brackets.getModule("utils/NodeDomain"),
FileUtils = brackets.getModule("file/FileUtils"),
FileSystem = brackets.getModule("filesystem/FileSystem"),
GraphicsFile = require("GraphicsFile");
/**
@ -49,7 +50,7 @@ define(function (require, exports, module) {
var extensionToExtApplicationMap = {};
function convertUnixPathToWindowsPath(path) {
if (brackets.platform === "win" && path && path[1] === ":" && path[2] === "/") {
if (brackets.platform === "win" && path && FileSystem.isAbsolutePath(path)) {
path = path.replace(RegExp('/','g'), '\\');
}
return path;