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

Windows path correction #15100

merged 6 commits into from
Mar 24, 2020

Conversation

niteskum
Copy link
Collaborator

Windows network path also need to be converted to windows style path
@jha-G @narayani28 please review

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

function convertUnixPathToWindowsPath(path) {
if (brackets.platform === "win" && path && path[1] === ":" && path[2] === "/") {
if (brackets.platform === "win"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for this change? Windows network paths?

Copy link
Collaborator Author

@niteskum niteskum Mar 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when we open network file with some external application, it does not accept path with forward-slash "/", so need to converted to windows style.

e.g
Illustrator "//<network_path_with_forward_slash>/example.ai this does not work."
so have to give like :
Illustrator "\\<network_path_with_backward_slash>\example.ai"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use the condition brackets.platform === "win" && FileSystem.isAbsolutePath().

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also are we planning to remove leading slashes from paths like /C:/notepad/notepad.exe?
And more than two leading slashes do not work for network path, so we are covered there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we will never have local path with leading slashes so not required.

@niteskum niteskum merged commit f37493f into adobe:master Mar 24, 2020
niteskum added a commit that referenced this pull request Mar 25, 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.

2 participants