trim service args and quotes

This commit is contained in:
henrypp committed 2020-09-05 20:28:48 +06:00
1 parent c2c8fb1234
commit fb13a627eb
1 file changed
+5 -10
+5 -10
View File
@@ -2217,18 +2217,8 @@ VOID _app_generate_services ()
{
// query path
if (!servicePath)
{
servicePath = _r_reg_querystring (hkey, L"ImagePath");
if (servicePath)
{
PathRemoveArgs (servicePath->Buffer);
PathUnquoteSpaces (servicePath->Buffer);
_r_string_trimtonullterminator (servicePath);
}
}
// query timestamp
if (!serviceTimestamp)
serviceTimestamp = _r_reg_querytimestamp (hkey);
@@ -2239,6 +2229,11 @@ VOID _app_generate_services ()
if (!_r_str_isempty (servicePath))
{
PathRemoveArgs (servicePath->Buffer);
PathUnquoteSpaces (servicePath->Buffer);
_r_string_trimtonullterminator (servicePath);
PR_STRING convertedPath = _r_path_dospathfromnt (servicePath->Buffer);
if (convertedPath)