Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
rust downloading delta instead of full if it's first in feed
Browse files Browse the repository at this point in the history
  • Loading branch information
caesay committed Mar 3, 2024
1 parent 200dd00 commit 1400544
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions for-rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
//! - ⚡️ **Lightning fast** – Velopack is written in Rust for native performance. Creating releases is multi-threaded, and produces delta packages for ultra fast app updates. Applying update packages is highly optimised, and often can be done in the background.
//!
//! ## Documentation
//! The documentation in this rust crate only covers the create itself, so it's highly recommended that you also
//! read the main Velopack documentation at [https://velopack.io/docs](https://velopack.io/docs).
//! The documentation in this rust crate is minimal and only covers the create itself, so it's highly recommended that you also
//! read the main Velopack documentation at [https://docs.velopack.io](https://docs.velopack.io).
//!
//! ## Components
//! - **this crate**: The core library that provides auto-update features and glue to the other components.
Expand Down
10 changes: 6 additions & 4 deletions for-rust/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,12 @@ impl<T: UpdateSource> UpdateManager<T> {
let mut latest_version: Version = Version::parse("0.0.0")?;
for asset in assets {
if let Ok(sv) = Version::parse(&asset.Version) {
debug!("Found asset: {} ({}).", asset.FileName, sv.to_string());
if latest.is_none() || (sv > latest_version && asset.Type.eq_ignore_ascii_case("Full")) {
latest = Some(asset);
latest_version = sv;
if asset.Type.eq_ignore_ascii_case("Full") {
debug!("Found full release: {} ({}).", asset.FileName, sv.to_string());
if latest.is_none() || (sv > latest_version) {
latest = Some(asset);
latest_version = sv;
}
}
}
}
Expand Down

0 comments on commit 1400544

Please sign in to comment.