mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +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 {
|
macro_rules! go {
|
||||||
($dist:expr, $src:expr, $inc:literal) => {
|
($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 {
|
for f in &$dist {
|
||||||
// TODO: use urn instead
|
if todo.remove(f.urn()).is_some() && todo.is_empty() {
|
||||||
if todo.remove(&f.url).is_some() && todo.is_empty() {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -265,9 +264,10 @@ impl Files {
|
||||||
let mut b = true;
|
let mut b = true;
|
||||||
for i in 0..$dist.len() {
|
for i in 0..$dist.len() {
|
||||||
if let Some(f) = $src.remove($dist[i].urn()) {
|
if let Some(f) = $src.remove($dist[i].urn()) {
|
||||||
b &= $dist[i].cha.hits(f.cha);
|
b = b && $dist[i].cha.hits(f.cha);
|
||||||
$dist[i] = f;
|
b = b && $dist[i].urn() == f.urn();
|
||||||
|
|
||||||
|
$dist[i] = f;
|
||||||
if $src.is_empty() {
|
if $src.is_empty() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue