mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Redirect android resource folder (user-agent.css and friends) to /sdcard/servo. This is a temporary solution, until they are packaged properly.
This commit is contained in:
parent
3a0b12f2c0
commit
e4bc2ca82a
1 changed files with 10 additions and 2 deletions
|
@ -3,11 +3,19 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::io::{File, IoResult};
|
||||
use std::io::fs::PathExtensions;
|
||||
use std::os;
|
||||
use std::path::Path;
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
use std::io::fs::PathExtensions;
|
||||
#[cfg(not(target_os = "android"))]
|
||||
use std::os;
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
pub fn resources_dir_path() -> Path {
|
||||
Path::new("/sdcard/servo/")
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
pub fn resources_dir_path() -> Path {
|
||||
// FIXME: Find a way to not rely on the executable being under `<servo source>/target`.
|
||||
let mut path = os::self_exe_path().expect("can't get exe path");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue