Skip to content

Commit

Permalink
Fix 'make_url' to handle absolute paths properly, allows servo comman…
Browse files Browse the repository at this point in the history
…d line to handle absolute paths.
  • Loading branch information
Josh Aas committed Apr 12, 2013
1 parent ca84c0b commit 7d81db6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/servo-gfx/util/url.rs
Expand Up @@ -22,7 +22,7 @@ pub fn make_url(str_url: ~str, current_url: Option<Url>) -> Url {
if current_url.is_none() {
// Assume we've been given a file path. If it's absolute just return
// it, otherwise make it absolute with the cwd.
if str_url[0] == "/"[0] {
if str_url.starts_with("/") {
~"file://" + str_url
} else {
~"file://" + os::getcwd().push(str_url).to_str()
Expand Down

0 comments on commit 7d81db6

Please sign in to comment.