Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions common/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ impl From<sea_orm::DbErr> for MegaError {
}

#[derive(Error, Debug)]
#[allow(unused)]
pub enum GitLFSError {
#[error("Something went wrong in Git LFS")]
#[error("Something went wrong in Git LFS: {0}")]
GeneralError(String),
}

Expand Down
3 changes: 3 additions & 0 deletions libra/src/internal/protocol/lfs_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ impl LFSClient {
// infer that all chunks share same size! (except last one)
let chunk_size = chunks.first().unwrap().size as usize;
let mut checksum = Context::new(&SHA256);
if let Some(parent) = path.as_ref().parent() {
tokio::fs::create_dir_all(parent).await?;
}
let mut file = tokio::fs::File::create(path).await?;
for (i, chunk) in chunks.iter().enumerate() { // TODO parallel download
println!("- part: {}/{}", i + 1, chunks.len());
Expand Down