AliSherKashif / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

File path formats vary depending on platform #1361

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

Please clearly state whether the issue relates to a device/the simulator or
the tools.  If related to a device be sure to specify exactly which device with 
as much details as possible.

All platforms return a different format for returned local file paths.

What steps will reproduce the problem?
1. Use one of the Capture class captureXX methods or Display's 
openImageGallery, or any method that returns a local file path string
2
3.

What is the expected output? What do you see instead?

Expected:

That the output will be in a single consistent format across all device types, 
including the simulator... preferably either a correctly formatted file scheme 
URI or a non-URI root-relative path.

Instead, you see:

simulator: file://<path to file>
iOS:  file:/<path to file>
android: <path to file>

Side note, iOS produces what is technically an invalid URL (file scheme is 
"file://" not "file:/"

What version of the product are you using? On what operating system?

Current version, operating systems mentioned above.

Please provide any additional information below.

Original issue reported on code.google.com by mallo...@gmail.com on 18 Feb 2015 at 6:51

GoogleCodeExporter commented 9 years ago
scratch the suggestion of a root relative path, given that there can be 
multiple roots per device.  I suggest returning a correctly formatted file URI 
for all platforms.

Original comment by mallo...@gmail.com on 18 Feb 2015 at 7:14