mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
servo: Merge #3280 - Fix loading of file URLs with spaces (from metajack:path-with-spaces)
Source-Repo: https://github.com/servo/servo Source-Revision: 3bd5ef3384610f6d666dedc9a5099f0c9d6d2cfc
This commit is contained in:
parent
b37690d9bb
commit
4c9e69c5d4
@ -35,7 +35,8 @@ pub fn factory() -> LoaderTask {
|
||||
assert!("file" == url.scheme.as_slice());
|
||||
let progress_chan = start_sending(start_chan, Metadata::default(url.clone()));
|
||||
spawn_named("file_loader", proc() {
|
||||
match File::open_mode(&Path::new(url.serialize_path().unwrap()), io::Open, io::Read) {
|
||||
let file_path: Path = url.to_file_path().unwrap();
|
||||
match File::open_mode(&Path::new(file_path), io::Open, io::Read) {
|
||||
Ok(ref mut reader) => {
|
||||
let res = read_all(reader as &mut io::Stream, &progress_chan);
|
||||
progress_chan.send(Done(res));
|
||||
|
Loading…
Reference in New Issue
Block a user