Skip to content

Commit

Permalink
Stream file even if it has been deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
javitonino committed May 23, 2024
1 parent baa25d1 commit 204ab79
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions nucliadb_node/src/replication/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,7 @@ async fn stream_file(
file: std::fs::File,
sender: &tokio::sync::mpsc::Sender<Result<replication::ReplicateShardResponse, tonic::Status>>,
) -> NodeResult<()> {
let filepath = shard_path.join(rel_filepath);

if !filepath.exists() {
return Err(node_error!("This file can not be streamed because it does not exist"));
}

debug!("Streaming file {}", filepath.to_string_lossy());
debug!("Streaming file {}", rel_filepath.to_string_lossy());
let mut total = 0;
let mut chunk = 1;
let mut file = File::from_std(file);
Expand Down

0 comments on commit 204ab79

Please sign in to comment.