Skip to content

Commit a5548f8

Browse files
committed
testing LocalDirRemoteFs fix
1 parent 868fba3 commit a5548f8

File tree

1 file changed

+10
-1
lines changed
  • rust/cubestore/cubestore/src/remotefs

1 file changed

+10
-1
lines changed

rust/cubestore/cubestore/src/remotefs/mod.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,21 @@ impl RemoteFs for LocalDirRemoteFs {
256256
.await
257257
.map_err(|e| {
258258
CubeError::internal(format!(
259-
"Rename {} -> {}: {}",
259+
"Copy {} -> {}: {}",
260260
temp_upload_path,
261261
local_path.to_string_lossy(),
262262
e
263263
))
264264
})?;
265+
fs::remove_file(&temp_upload_path)
266+
.await
267+
.map_err(|e| {
268+
CubeError::internal(format!(
269+
"Remove {}: {}",
270+
temp_upload_path,
271+
e
272+
))
273+
})?;
265274
}
266275
Ok(fs::metadata(local_path).await?.len())
267276
}

0 commit comments

Comments
 (0)