On windows the location on about:debugging has a beginning /

RESOLVED FIXED in Firefox 56

Status

defect
P5
normal
RESOLVED FIXED
2 years ago
Last year

People

(Reporter: andy+bugzilla, Assigned: mstriemer)

Tracking

unspecified
mozilla56
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox56 fixed)

Details

(Whiteboard: triaged)

Attachments

(2 attachments)

Posted image file-path.PNG
Note in the screenshot its /C:/

When run at the Windows command prompt you'll get:

C:\Users\andy\Desktop\poc>cd /C:/Users/andy/Desktop/poc/latest-download/
The filename, directory name, or volume label syntax is incorrect.

Also / not \, but those work fine in the command prompt, for example:

C:\Users\andy>cd C:/Users/andy/Desktop/poc/latest-download/

C:\Users\andy\Desktop\poc\latest-download>
Assignee: nobody → mstriemer
Comment on attachment 8881932 [details]
Bug 1367485 - Improve formatting of Windows paths in about:debugging

https://reviewboard.mozilla.org/r/152998/#review159268

Looks good, thanks! A few comments to address before landing.

(regarding the xpcshell tests on android, I added some android jobs on https://treeherder.mozilla.org/#/jobs?repo=try&revision=d402cef9be8e to make we should skip it)

::: devtools/client/aboutdebugging/components/addons/target.js:26
(Diff revision 4)
>    "chrome://devtools/locale/aboutdebugging.properties");
>  
>  const TEMP_ID_URL = "https://developer.mozilla.org/Add-ons" +
>                      "/WebExtensions/WebExtensions_and_the_Add-on_ID";
>  
> +function parseFileUri(url) {

Since it needs to be exported for tests, could we move this utility method to devtools/client/aboutdebugging/modules/addon.js ?

::: devtools/client/aboutdebugging/components/addons/target.js:27
(Diff revision 4)
>  
>  const TEMP_ID_URL = "https://developer.mozilla.org/Add-ons" +
>                      "/WebExtensions/WebExtensions_and_the_Add-on_ID";
>  
> +function parseFileUri(url) {
> +  const windowsRegex = /^file:\/\/\/([a-zA-z]:\/.*)/;

[a-zA-z] should be [a-zA-Z] (second 'z' uppercase) otherwise this accepts some unwanted characters.

::: devtools/client/aboutdebugging/test/xpcshell.ini:4
(Diff revision 4)
> +[DEFAULT]
> +tags = devtools
> +head = xpcshell-head.js
> +firefox-appdir = browser

devtools/client files are not shipped on android builds, so we should probably add 

skip-if = toolkit == 'android'
Attachment #8881932 - Flags: review?(jdescottes) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/fdb392ac2f89
Improve formatting of Windows paths in about:debugging r=jdescottes
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/fdb392ac2f89
Status: NEW → RESOLVED
Closed: 2 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.