File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ namespace shellanything
5353 std::string arguments = pmgr.expand (mArguments );
5454
5555 bool basedir_missing = basedir.empty ();
56+ bool arguments_missing = arguments.empty ();
5657
5758 // Note: the startProcess() function requires basedir to be valid.
5859 // If not specified try to fill basedir with the best option available
@@ -94,11 +95,19 @@ namespace shellanything
9495 }
9596
9697 // debug
97- LOG (INFO) << " Running '" << path << " ' from directory '" << basedir << " ' with arguments '" << arguments << " '" ;
98-
99- uint32_t pId = ra::process::StartProcess (path, arguments, basedir);
98+ uint32_t pId = ra::process::INVALID_PROCESS_ID;
99+ if (arguments_missing)
100+ {
101+ LOG (INFO) << " Running '" << path << " ' from directory '" << basedir << " '" ;
102+ pId = ra::process::StartProcess (path, basedir);
103+ }
104+ else
105+ {
106+ LOG (INFO) << " Running '" << path << " ' from directory '" << basedir << " ' with arguments '" << arguments << " '" ;
107+ pId = ra::process::StartProcess (path, basedir, arguments);
108+ }
100109
101- bool success = pId != 0 ;
110+ bool success = pId != ra::process::INVALID_PROCESS_ID ;
102111 if (success)
103112 {
104113 LOG (INFO) << " Process created. PID=" << pId;
You can’t perform that action at this time.
0 commit comments