Merge pull request #8301 from Apokleos/do-direct-volume

runtime-rs: Enhancing DirectVolMount Handling with Patching Support
This commit is contained in:
Chao Wu
2023-12-04 16:49:46 +08:00
committed by GitHub
10 changed files with 407 additions and 239 deletions

View File

@@ -483,7 +483,7 @@ impl<H> StorageHandlerManager<H> {
/// The `volume_path` is base64-url-encoded and then safely joined to the `prefix`
pub fn join_path(prefix: &str, volume_path: &str) -> Result<PathBuf> {
if volume_path.is_empty() {
return Err(anyhow!("volume path must not be empty"));
return Err(anyhow!(std::io::ErrorKind::NotFound));
}
let b64_url_encoded_path = base64::encode_config(volume_path.as_bytes(), base64::URL_SAFE);