From fb13a627eb4861f2b1d3c4e8d87a2ba1fcfbb0fc Mon Sep 17 00:00:00 2001 From: henrypp Date: Sat, 5 Sep 2020 20:28:48 +0600 Subject: [PATCH] trim service args and quotes --- src/helper.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/helper.cpp b/src/helper.cpp index cfc6bbad..364a595f 100644 --- a/src/helper.cpp +++ b/src/helper.cpp @@ -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)