// Loads the manifest for an app:
// First tries to load it from app_dir/application.zip!manifest.webapp if it's present,
// and fallbacks to app_dir/manifest.webapp
Loads the manifest for an app:
First tries to load it from app_dir/application.zip!manifest.webapp if it's present,
and fallbacks to app_dir/manifest.webapp
Loads the manifest for an app : First tries to load it from app_dir / application . zip!manifest . webapp if it ' s present and fallbacks to app_dir / manifest . webapp
fn load_manifest(app_dir: &PathBuf) -> Result<Manifest, AppsError> {
    let zipfile = app_dir.join("application.zip");
    if let Ok(manifest) = read_zip_manifest(zipfile.as_path()) {
        Ok(manifest)
    } else {
        let manifest = app_dir.join("manifest.webapp");
        let file = File::open(manifest)?;
        let reader = BufReader::new(file);
        let value: Manifest = serde_json::from_reader(reader)?;
        Ok(value)
    }
}
fn load_manifest ( app_dir : & PathBuf ) -> Result < Manifest , AppsError > { let zipfile = app_dir . join ( " " ) ; if let Ok ( manifest ) = read_zip_manifest ( zipfile . as_path ( ) ) { Ok ( manifest ) } else { let manifest = app_dir . join ( " " ) ; let file = File :: open ( manifest ) ? ; let reader = BufReader :: new ( file ) ; let value : Manifest = serde_json :: from_reader ( reader ) ? ; Ok ( value ) } }
Loads the manifest for an app:
First tries to load it from app_dir/application.zip!manifest.webapp if it's present,
and fallbacks to app_dir/manifest.webapp
Loads the manifest for an app : First tries to load it from app_dir / application . zip!manifest . webapp if it ' s present and fallbacks to app_dir / manifest . webapp
app_dir
&PathBuf