mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
c4df931b81
commit
575401ac8b
1 changed files with 15 additions and 3 deletions
|
|
@ -155,7 +155,7 @@ impl Tasks {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn file_cut(&self, src: &HashSet<Url>, dest: Url, force: bool) -> bool {
|
||||
pub fn file_cut(&self, src: &HashSet<Url>, dest: &Url, force: bool) -> bool {
|
||||
for u in src {
|
||||
let to = dest.join(u.file_name().unwrap());
|
||||
if force && u == &to {
|
||||
|
|
@ -167,13 +167,25 @@ impl Tasks {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn file_copy(&self, src: &HashSet<Url>, dest: Url, force: bool, follow: bool) -> bool {
|
||||
pub fn file_copy(&self, src: &HashSet<Url>, dest: &Url, force: bool) -> bool {
|
||||
for u in src {
|
||||
let to = dest.join(u.file_name().unwrap());
|
||||
if force && u == &to {
|
||||
trace!("file_copy: same file, skipping {:?}", to);
|
||||
} else {
|
||||
self.scheduler.file_copy(u.clone(), to, force, follow);
|
||||
self.scheduler.file_copy(u.clone(), to, force);
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
pub fn file_link(&self, src: &HashSet<Url>, dest: &Url, relative: bool, force: bool) -> bool {
|
||||
for u in src {
|
||||
let to = dest.join(u.file_name().unwrap());
|
||||
if force && *u == to {
|
||||
trace!("file_link: same file, skipping {:?}", to);
|
||||
} else {
|
||||
self.scheduler.file_link(u.clone(), to, force, relative);
|
||||
}
|
||||
}
|
||||
false
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue