This commit is contained in:
evpeople 2025-01-29 20:24:45 +08:00
parent f5da79f302
commit a2ea22a5f2
No known key found for this signature in database
GPG key ID: CF5768B6A73046FF
2 changed files with 51 additions and 53 deletions

View file

@ -1,12 +1,11 @@
use std::{borrow::Cow, collections::{HashMap, HashSet}, ffi::{OsStr, OsString}, io::{stderr, BufWriter, Write}, path::PathBuf};
use std::{borrow::Cow, collections::{HashMap, HashSet}, ffi::{OsStr, OsString}, io::{BufWriter, Write, stderr}, path::PathBuf};
use anyhow::{Result, anyhow};
use scopeguard::defer;
use tokio::{io::{AsyncReadExt, AsyncWriteExt, stdin}};
use tokio::fs;
use tokio::{fs, io::{AsyncReadExt, AsyncWriteExt, stdin}};
use yazi_config::{OPEN, PREVIEW};
use yazi_dds::Pubsub;
use yazi_fs::{max_common_root, maybe_exists, ok_or_not_found, paths_to_same_file, realname, File, FilesOp};
use yazi_fs::{File, FilesOp, max_common_root, maybe_exists, ok_or_not_found, paths_to_same_file, realname};
use yazi_proxy::{AppProxy, HIDER, TasksProxy, WATCHER};
use yazi_shared::{terminal_clear, url::{Url, UrnBuf}};
@ -96,8 +95,6 @@ impl Manager {
}
}
if !succeeded.is_empty() {
Pubsub::pub_from_bulk(succeeded.iter().map(|(o, n)| (o, &n.url)).collect());
FilesOp::create(succeeded.into_values().collect());

View file

@ -74,6 +74,7 @@ impl FilesOp {
}
}
}
pub fn create(files: Vec<File>) {
let mut parents: HashMap<_, Vec<_>> = Default::default();
for file in files {