On 4/11/2013 6:55 PM, josh...@gmail.com wrote:
I was taking servo for a spin, my cwd was the servo build dir, and I tried to 
point it to a file on my desktop, like so:

./servo ~/Desktop/css-selectors.html

This results in a blank page because the path generated internally is:

file:/Users/josh/src/mozilla/bdaehlie-servo/build/Users/josh/Desktop/css-selectors.html

This is because the following code runs on the command line input:

     for opts.urls.each |filename| {
         let url = make_url(copy *filename, None);
FWIW, the current behavior of Firefox which was tuned to give the most intuitive results is implemented here:

http://mxr.mozilla.org/mozilla-central/source/toolkit/components/commandlines/nsCommandLine.cpp#377

* First try to interpret the argument as an *absolute* file path. This handles the complexity of C:\ and \\servername handling on windows, primarily * Then intepret the argument as a *URI* relative to the URI of the current working directory. This handles pretty much all other behaviors, including relative file paths and direct URI arguments.

--BDS

_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to