修复加载配置文件BUG
This commit is contained in:
parent
970db48e17
commit
b44dd6940c
|
@ -469,13 +469,14 @@ int scanner::open(void)
|
|||
ret = hg_sane_middleware::instance()->open_device(name.c_str(), &handle_);
|
||||
if (ret == SANE_STATUS_GOOD)
|
||||
{
|
||||
size_t pid = scanner_name_.find(L" - ");
|
||||
if (pid == -1)
|
||||
pid = scanner_name_.length();
|
||||
size_t pid = -1;
|
||||
|
||||
transport_config_file();
|
||||
callback::reg_callback(handle_, this);
|
||||
scanner_name_ = local_trans::a2u(name.c_str(), CP_UTF8);
|
||||
pid = scanner_name_.find(L" - ");
|
||||
if (pid == -1)
|
||||
pid = scanner_name_.length();
|
||||
ret = init_options_id();
|
||||
load_config((cfg_path_ + scanner_name_.substr(0, pid) + L".cfg").c_str());
|
||||
apply_config();
|
||||
|
|
Loading…
Reference in New Issue