fix: change state to sync jobs to adapt master branch logic

This commit is contained in:
Kingtous 2022-05-13 15:11:56 +08:00
parent c96c0df645
commit d186dd26a2
2 changed files with 3 additions and 2 deletions

View File

@ -621,7 +621,7 @@ function initializeFileTransfer()
}
handler.updateFolderFiles = function(fd) {
stdout.println("update folder files: " + JSON.stringify(fd));
// stdout.println("update folder files: " + JSON.stringify(fd));
fd.entries = fd.entries || [];
if (fd.id > 0) {
var jt = file_transfer.job_table;

View File

@ -1319,6 +1319,7 @@ async fn io_loop(handler: Handler) {
clipboard_file_context: None,
};
remote.io_loop(&key, &token).await;
remote.sync_jobs_status_to_local().await;
}
struct RemoveJob {
@ -1451,7 +1452,6 @@ impl Remote {
}
}
}
self.sync_jobs_status_to_local().await;
log::debug!("Exit io_loop of id={}", self.handler.id);
}
Err(err) => {
@ -1876,6 +1876,7 @@ impl Remote {
let json_str = serde_json::to_string(&job.gen_meta()).unwrap();
transfer_metas.write_jobs.push(json_str);
}
log::info!("meta: {:?}",transfer_metas);
config.transfer = transfer_metas;
self.handler.save_config(config);
true