Update old cache handling

This commit is contained in:
kerty
2024-10-25 10:15:59 +03:00
parent b4cf86288c
commit 716c489ae1
3 changed files with 10 additions and 8 deletions

6
Cargo.lock generated
View File

@@ -237,7 +237,7 @@ checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
[[package]]
name = "common"
version = "0.9.5-masterV2"
version = "0.9.5-masterV3"
dependencies = [
"criterion",
"fastrand",
@@ -837,7 +837,7 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "swww"
version = "0.9.5-masterV2"
version = "0.9.5-masterV3"
dependencies = [
"assert_cmd",
"clap",
@@ -850,7 +850,7 @@ dependencies = [
[[package]]
name = "swww-daemon"
version = "0.9.5-masterV2"
version = "0.9.5-masterV3"
dependencies = [
"common",
"keyframe",

View File

@@ -5,7 +5,7 @@ members = ["client", "daemon", "common"]
default-members = ["client", "daemon"]
[workspace.package]
version = "0.9.5-masterV2"
version = "0.9.5-masterV3"
authors = ["Leonardo Gibrowski Faé <leonardo.fae44@gmail.com>"]
edition = "2021"
license-file = "LICENSE"

View File

@@ -82,10 +82,12 @@ pub fn get_previous_image_path(output_name: &str) -> io::Result<(String, String)
)
})?;
if let Some(buf) = buf.split_once("\n") {
Ok((buf.0.to_string(), buf.1.to_string()))
} else {
Ok(("Lanczos3".to_string(), buf))
match buf.split_once("\n") {
Some(buf) => Ok((buf.0.to_string(), buf.1.to_string())),
None => Err(std::io::Error::new(
std::io::ErrorKind::Other,
"failed to read image filter",
)),
}
}