Skip to content

Commit

Permalink
A bug between epoches of fav faemon that status won't be saved.
Browse files Browse the repository at this point in the history
  • Loading branch information
kingwingfly committed Jul 21, 2024
1 parent 9a77292 commit 7acde19
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
-->

## [Unreleased]
### [0.2.30] - 2024-06-18
## [0.2.30] - 2024-06-18

- fix: wrong hint of `fav status -h`
- fix: status won't be saved after each epoch of fav daemon

## [0.2.29] - 2024-06-18

Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolver = "2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[workspace.package]
version = "0.2.29"
version = "0.2.30"
authors = ["Louis <[email protected]>"]
description = "Back up your favorite online resources with CLI."
license = "MIT"
Expand All @@ -14,10 +14,10 @@ repository = "https://github.com/kingwingfly/fav"
documentation = ""

[workspace.dependencies]
fav_core = { path = "fav_core", version = "0.1.3" }
fav_core = { path = "fav_core", version = "0.1.4" }
fav_derive = { path = "fav_derive", version = "0.0.2" }
fav_utils = { path = "fav_utils", version = "0.0.12" }
fav_cli = { path = "fav_cli", version = "0.2.29" }
fav_cli = { path = "fav_cli", version = "0.2.30" }

[profile.release]
lto = "fat"
Expand Down
1 change: 1 addition & 0 deletions fav_cli/src/bili/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ pub(super) async fn daemon(sets: &mut BiliSets, interval: u64) -> FavCoreResult<
loop {
tokio::select! {
res = pull_all(sets), if fire => {
sets.write()?;
if let Err(e) = res {
error!("{}", e);
}
Expand Down
2 changes: 1 addition & 1 deletion fav_core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fav_core"
version = "0.1.3"
version = "0.1.4"
authors.workspace = true
description = "Fav's core crate; A collection of traits."
license.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion fav_core/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub trait PathInfo {
pub trait ProtoLocal: PathInfo + MessageFull {
/// Write the protobuf to file, which is at `PathInfo::PATH`
/// Create the parent directory if not exists
fn write(self) -> FavCoreResult<()> {
fn write(&self) -> FavCoreResult<()> {
let path = std::path::PathBuf::from(Self::PATH);
if let Some(parent) = path.parent() {
std::fs::create_dir_all(parent)?;
Expand Down

0 comments on commit 7acde19

Please sign in to comment.