Closed Bug 1609263 Opened 5 years ago Closed 5 years ago

Android paths are generated with Windows file separators

Categories

(Testing :: geckodriver, defect, P3)

Version 3
Unspecified
Windows
defect

Tracking

(firefox74 fixed)

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: barret, Assigned: barret)

References

Details

Attachments

(1 file)

When running Geckodriver on Windows, it will generate paths for the Android device that use the Windows file separator, e.g.:

/data/local/tmp\org.mozilla.geckoview_example-geckoview-config.yaml

This results in operations that will fail.

Thanks for filing! We should indeed fix that for the 0.27 release.

The failing part is here:
https://searchfox.org/mozilla-central/rev/9b4b41b95cbcda63f565bdc24411e15248f91d83/testing/geckodriver/src/android.rs#256-257

Given that push() doesn't offer a custom path separator I would propose we combine those two lines, and directly create the path buf.

Barret, would you be interested to fix that?

Blocks: 1584911
Priority: -- → P3
Assignee: nobody → brennie
Status: NEW → ASSIGNED

I'll do that for now, but I think mozdevice should not be accepting a Path for remote paths, since Path is only valid for local paths. I'm going to file a bug to update mozdevice to use nix::NixPath or similar (or &str)

Paths for pushing files to Android devices were being constructed with
PathBuf::push, which uses the system file separator. On Windows, this results
in malformed paths like
/data/local/tmp\org.mozilla.geckoview_example-geckoview-config.yml.

Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/485e623584d6 Construct Android paths directly without PathBuf::push r=nalexander,webdriver-reviewers,whimboo
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: