mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
refactor: use data_dir fn
This commit is contained in:
committed by
Aiden McClelland
parent
ea76811902
commit
34429d89d6
@@ -210,17 +210,11 @@ impl Volume {
|
|||||||
volume_id,
|
volume_id,
|
||||||
path,
|
path,
|
||||||
..
|
..
|
||||||
} => ctx
|
} => data_dir(&ctx.datadir, package_id, volume_id).join(if path.is_absolute() {
|
||||||
.datadir
|
path.strip_prefix("/").unwrap()
|
||||||
.join(PKG_VOLUME_DIR)
|
} else {
|
||||||
.join(package_id)
|
path.as_ref()
|
||||||
.join("data")
|
}),
|
||||||
.join(volume_id)
|
|
||||||
.join(if path.is_absolute() {
|
|
||||||
path.strip_prefix("/").unwrap()
|
|
||||||
} else {
|
|
||||||
path.as_ref()
|
|
||||||
}),
|
|
||||||
Volume::Certificate { interface_id: _ } => {
|
Volume::Certificate { interface_id: _ } => {
|
||||||
ctx.net_controller.nginx.ssl_directory_for(pkg_id)
|
ctx.net_controller.nginx.ssl_directory_for(pkg_id)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user