File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -466,17 +466,15 @@ int RunChromeDriver() {
466466 return (EXIT_SUCCESS);
467467}
468468
469- #if !defined(OS_WIN)
470469bool parse_config_to_cmd_line ()
471470{
472471 CommandLine* cmd_line = CommandLine::ForCurrentProcess ();
472+
473473 if (cmd_line->HasSwitch (" config" ))
474474 {
475475 // parse json config file and set value
476476 std::string config_json;
477- std::string configPathString = cmd_line->GetSwitchValueASCII (" config" );
478-
479- FilePath configPath (configPathString);
477+ FilePath configPath (cmd_line->GetSwitchValueNative (" config" ));
480478
481479 if (file_util::ReadFileToString (configPath, &config_json))
482480 {
@@ -511,26 +509,22 @@ bool parse_config_to_cmd_line()
511509 cmd_line->AppendSwitchASCII (" http-threads" , base::IntToString (http_threads));
512510 if (result_dict->GetString (" log-path" , &log_path))
513511 cmd_line->AppendSwitchASCII (" log-path" , log_path);
514-
515- return true ;
516-
517512 }
518513 else
519514 {
520515 std::cerr << " can't read file" << std::endl;
521516 return false ;
522517 }
523518 }
519+
520+ return true ;
524521}
525- #endif // !defined(OS_WIN)
526522} // namespace webdriver
527523
528524int main_server (int argc, char *argv[]) {
529525 CommandLine::Init (argc, argv);
530526
531- #if !defined(OS_WIN)
532527 webdriver::parse_config_to_cmd_line ();
533- #endif
534528
535529 return webdriver::RunChromeDriver ();
536530}
Original file line number Diff line number Diff line change 5858 #endif
5959#define _WIN32_WINNT 0x0400 // To make it link in VS2005
6060#include <windows.h>
61- #include <winsock2.h>
61+ // #include <winsock2.h>
6262
6363#ifndef PATH_MAX
6464#define PATH_MAX MAX_PATH
You can’t perform that action at this time.
0 commit comments