mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
fix: ensure that changing directories occurs before searching
This commit is contained in:
parent
69dec96833
commit
2b1b66e5e0
1 changed files with 1 additions and 4 deletions
|
|
@ -59,11 +59,8 @@ impl Tab {
|
|||
let rx = UnboundedReceiverStream::new(rx).chunks_timeout(1000, Duration::from_millis(300));
|
||||
pin!(rx);
|
||||
|
||||
let (mut first, ticket) = (true, FilesOp::prepare(&cwd));
|
||||
let ((), ticket) = (Tab::_cd(&cwd), FilesOp::prepare(&cwd));
|
||||
while let Some(chunk) = rx.next().await {
|
||||
if mem::replace(&mut first, false) {
|
||||
Tab::_cd(&cwd);
|
||||
}
|
||||
FilesOp::Part(cwd.clone(), chunk, ticket).emit();
|
||||
}
|
||||
FilesOp::Done(cwd, None, ticket).emit();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue