Skip to content
Snippets Groups Projects
Commit 05f0b9e0 authored by Simon Sapin's avatar Simon Sapin
Browse files

Overwrite local file in new-dataset even if not overwriting on the server

parent 5dcc6faa
No related branches found
No related tags found
1 merge request!3Add support for installing tools and caching their install
Pipeline #34622 passed
......@@ -103,7 +103,12 @@
}
}
let (cache_path, dataset) = poulpe.write_file_atomic(args.overwrite, |file| {
// Because the path is based on a hash of the contents,
// overwritting an existing local file is a no-op.
// This could happen if we’re uploading again a file that was removed from the server,
// or if uploading previously failed.
let clobber = true;
let (cache_path, dataset) = poulpe.write_file_atomic(clobber, |file| {
let sha = Sha256::new();
let tee = Tee(file, sha);
let level = zstd::DEFAULT_COMPRESSION_LEVEL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment