mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
fix asset mounts
This commit is contained in:
@@ -170,17 +170,17 @@ impl PersistentContainer {
|
|||||||
.arg(&mountpoint)
|
.arg(&mountpoint)
|
||||||
.invoke(crate::ErrorKind::Filesystem)
|
.invoke(crate::ErrorKind::Filesystem)
|
||||||
.await?;
|
.await?;
|
||||||
|
let s9pk_asset_path = Path::new("assets").join(asset).with_extension("squashfs");
|
||||||
|
let sqfs = s9pk
|
||||||
|
.as_archive()
|
||||||
|
.contents()
|
||||||
|
.get_path(&s9pk_asset_path)
|
||||||
|
.and_then(|e| e.as_file())
|
||||||
|
.or_not_found(s9pk_asset_path.display())?;
|
||||||
assets.insert(
|
assets.insert(
|
||||||
asset.clone(),
|
asset.clone(),
|
||||||
MountGuard::mount(
|
MountGuard::mount(
|
||||||
&Bind::new(
|
&IdMapped::new(LoopDev::from(&**sqfs), 0, 100000, 65536),
|
||||||
asset_dir(
|
|
||||||
&ctx.datadir,
|
|
||||||
&s9pk.as_manifest().id,
|
|
||||||
&s9pk.as_manifest().version,
|
|
||||||
)
|
|
||||||
.join(asset),
|
|
||||||
),
|
|
||||||
mountpoint,
|
mountpoint,
|
||||||
MountType::ReadWrite,
|
MountType::ReadWrite,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user