mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-26 05:56:50 +00:00
add xl_meta.update_object_version
This commit is contained in:
@@ -1163,7 +1163,7 @@ impl DiskAPI for LocalDisk {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
async fn update_metadata(&self, volume: &str, path: &str, fi: FileInfo, opts: UpdateMetadataOpts) -> Result<()> {
|
async fn update_metadata(&self, volume: &str, path: &str, fi: FileInfo, opts: UpdateMetadataOpts) -> Result<()> {
|
||||||
if let Some(metadata) = &fi.metadata {
|
if let Some(_) = &fi.metadata {
|
||||||
let volume_dir = self.get_bucket_path(&volume)?;
|
let volume_dir = self.get_bucket_path(&volume)?;
|
||||||
let file_path = volume_dir.join(Path::new(&path));
|
let file_path = volume_dir.join(Path::new(&path));
|
||||||
|
|
||||||
@@ -1184,7 +1184,7 @@ impl DiskAPI for LocalDisk {
|
|||||||
return Err(Error::new(DiskError::FileVersionNotFound));
|
return Err(Error::new(DiskError::FileVersionNotFound));
|
||||||
}
|
}
|
||||||
|
|
||||||
let xl_meta = FileMeta::load(buf.as_slice())?;
|
let mut xl_meta = FileMeta::load(buf.as_slice())?;
|
||||||
|
|
||||||
xl_meta.update_object_version(fi)?;
|
xl_meta.update_object_version(fi)?;
|
||||||
|
|
||||||
@@ -1198,8 +1198,6 @@ impl DiskAPI for LocalDisk {
|
|||||||
!opts.no_persistence,
|
!opts.no_persistence,
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
// FIXME:
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Err(Error::msg("Invalid Argument"))
|
Err(Error::msg("Invalid Argument"))
|
||||||
|
|||||||
Reference in New Issue
Block a user