This commit is contained in:
sxyazi 2024-04-20 13:21:03 +08:00
parent 4267d24f06
commit 45932baf4d
No known key found for this signature in database
2 changed files with 9 additions and 3 deletions

View file

@ -99,7 +99,10 @@ impl Scheduler {
if !force { if !force {
to = unique_path(to).await; to = unique_path(to).await;
} }
file.paste(FileOpPaste { id, from, to, cut: true, follow: false, retry: 0 }).await.ok(); file
.paste(FileOpPaste { id, from, to, meta: None, cut: true, follow: false, retry: 0 })
.await
.ok();
} }
.boxed(), .boxed(),
LOW, LOW,
@ -121,7 +124,10 @@ impl Scheduler {
if !force { if !force {
to = unique_path(to).await; to = unique_path(to).await;
} }
file.paste(FileOpPaste { id, from, to, cut: false, follow, retry: 0 }).await.ok(); file
.paste(FileOpPaste { id, from, to, meta: None, cut: false, follow, retry: 0 })
.await
.ok();
} }
.boxed(), .boxed(),
LOW, LOW,

View file

@ -1,7 +1,7 @@
use std::{collections::VecDeque, fs::Metadata, path::{Path, PathBuf}}; use std::{collections::VecDeque, fs::Metadata, path::{Path, PathBuf}};
use anyhow::Result; use anyhow::Result;
use filetime::{set_file_mtime, set_file_times, FileTime}; use filetime::{set_file_mtime, FileTime};
use tokio::{fs, io, select, sync::{mpsc, oneshot}, time}; use tokio::{fs, io, select, sync::{mpsc, oneshot}, time};
pub async fn accessible(path: &Path) -> bool { pub async fn accessible(path: &Path) -> bool {