(
paths: &PglitePaths,
policy: RuntimeLayoutPolicy,
)
| 1754 | } |
| 1755 | |
| 1756 | fn resolve_runtime_layout_kind( |
| 1757 | paths: &PglitePaths, |
| 1758 | policy: RuntimeLayoutPolicy, |
| 1759 | ) -> Result<RuntimeLayoutKind> { |
| 1760 | match policy { |
| 1761 | RuntimeLayoutPolicy::FullLocal => return Ok(RuntimeLayoutKind::FullLocal), |
| 1762 | RuntimeLayoutPolicy::Auto => {} |
| 1763 | } |
| 1764 | |
| 1765 | if let Some(manifest) = read_runtime_layout_manifest(&paths.runtime_root())? |
| 1766 | && manifest.kind == RuntimeLayoutKind::SharedRuntimeOverlay |
| 1767 | { |
| 1768 | return Ok(RuntimeLayoutKind::SharedRuntimeOverlay); |
| 1769 | } |
| 1770 | if paths.runtime_root().join(MOUNTFS_RUNTIME_MARKER).is_file() { |
| 1771 | return Ok(RuntimeLayoutKind::SharedRuntimeOverlay); |
| 1772 | } |
| 1773 | if shared_runtime_overlay_enabled() { |
| 1774 | return Ok(RuntimeLayoutKind::SharedRuntimeOverlay); |
| 1775 | } |
| 1776 | Ok(RuntimeLayoutKind::FullLocal) |
| 1777 | } |
| 1778 | |
| 1779 | fn write_runtime_layout_manifest( |
| 1780 | runtime_root: &Path, |
no test coverage detected