mirror of
https://github.com/sxyazi/yazi.git
synced 2026-05-13 08:16:40 +00:00
fix: increase the revision when there is a change in Urn on updating (#1691)
This commit is contained in:
parent
9f8109e02e
commit
70fbe41cc2
1 changed files with 5 additions and 5 deletions
|
|
@ -174,10 +174,9 @@ impl Files {
|
|||
|
||||
macro_rules! go {
|
||||
($dist:expr, $src:expr, $inc:literal) => {
|
||||
let mut todo: HashMap<_, _> = $src.into_iter().map(|f| (f.url_owned(), f)).collect();
|
||||
let mut todo: HashMap<_, _> = $src.into_iter().map(|f| (f.urn_owned(), f)).collect();
|
||||
for f in &$dist {
|
||||
// TODO: use urn instead
|
||||
if todo.remove(&f.url).is_some() && todo.is_empty() {
|
||||
if todo.remove(f.urn()).is_some() && todo.is_empty() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -265,9 +264,10 @@ impl Files {
|
|||
let mut b = true;
|
||||
for i in 0..$dist.len() {
|
||||
if let Some(f) = $src.remove($dist[i].urn()) {
|
||||
b &= $dist[i].cha.hits(f.cha);
|
||||
$dist[i] = f;
|
||||
b = b && $dist[i].cha.hits(f.cha);
|
||||
b = b && $dist[i].urn() == f.urn();
|
||||
|
||||
$dist[i] = f;
|
||||
if $src.is_empty() {
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue