Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Windows path correction #15100

Merged
merged 6 commits into from
Mar 24, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Addressed review comments
  • Loading branch information
Nitesh Kumar committed Mar 24, 2020
commit 35917cb272d681230d778f03bfb96d7b56c19c6c
4 changes: 2 additions & 2 deletions src/extensions/default/OpenWithExternalApplication/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");

/**
Expand All @@ -49,8 +50,7 @@ define(function (require, exports, module) {
var extensionToExtApplicationMap = {};

function convertUnixPathToWindowsPath(path) {
if (brackets.platform === "win"
&& path && ((path[1] === ":" && path[2] === "/") || (path[0] === "/" && path[1] === "/"))) {
if (brackets.platform === "win" && path && FileSystem.isAbsolutePath(path)) {
path = path.replace(RegExp('/','g'), '\\');
}
return path;
Expand Down