校验config文件中excel路径是否存在
This commit is contained in:
parent
3dc2b3d432
commit
49499a88b3
@ -1,4 +1,5 @@
|
||||
use std::cell::RefCell;
|
||||
use std::path::Path;
|
||||
use std::process;
|
||||
use std::rc::Rc;
|
||||
use std::sync::{Arc, Mutex};
|
||||
@ -36,7 +37,7 @@ impl UiService {
|
||||
should_current_line = work_service.config_model.current_line;
|
||||
}
|
||||
|
||||
if work_service_rc.borrow().config_model.excel_path != "" {
|
||||
if Path::exists(work_service_rc.borrow().config_model.excel_path.as_ref()) {
|
||||
ui.borrow_mut().excel_file_textbox.set_value(&work_service_rc.borrow().config_model.excel_path);
|
||||
ui.borrow_mut().current_line_textbox.set_value(&work_service_rc.borrow().config_model.current_line.to_string());
|
||||
let index = ui.borrow().com_choice.find_index(¤t_com);
|
||||
|
Loading…
Reference in New Issue
Block a user