国产系统system命令打开pdf文件需要加特定符号标识
This commit is contained in:
parent
e5311b9175
commit
bdb975bdfb
|
@ -1,4 +1,4 @@
|
|||
#include "hg_scanner.h"
|
||||
#include "hg_scanner.h"
|
||||
#include "../wrapper/hg_log.h"
|
||||
#include "sane/sane_option_definitions.h"
|
||||
#include "scanner_setting.h"
|
||||
|
@ -1657,8 +1657,11 @@ int hg_scanner::setting_help(void* data, long* len)
|
|||
{
|
||||
std::string helpfile = get_help_file_path();
|
||||
|
||||
std::string com = "xdg-open ";//注意空格保留
|
||||
|
||||
int ret = SCANNER_ERR_OK;
|
||||
#if defined(WIN32) || defined(_WIN64)
|
||||
com = "";
|
||||
FILE* src = fopen(helpfile.c_str(), "rb");
|
||||
if (src)
|
||||
fclose(src);
|
||||
|
@ -1672,10 +1675,12 @@ int hg_scanner::setting_help(void* data, long* len)
|
|||
return ret ;
|
||||
}
|
||||
|
||||
com += helpfile;
|
||||
|
||||
#if defined(WIN32) || defined(_WIN64)
|
||||
ShellExecuteA(NULL, "Open", helpfile.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||
ShellExecuteA(NULL, "Open", com.c_str(), NULL, NULL, SW_SHOWNORMAL);
|
||||
#else
|
||||
system(helpfile.c_str());
|
||||
system(com.c_str());
|
||||
#endif
|
||||
VLOG_MINI_2(LOG_LEVEL_DEBUG_INFO,"scanSettings_Help_pdf Path is:%s %d\r\n",helpfile.c_str(), 1);
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue