Update preprocessed_command with the end result of the path checks

So we don't rely on ShellExecuteExW doing the same.

Change-Id: I83efe08b0e0fe062c6e0402fab8ebbf36e56cadc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169908
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski 2024-07-03 12:22:51 +05:00
parent ece698a575
commit 858c078056

View file

@ -254,7 +254,6 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
throw css::lang::IllegalArgumentException(
"XSystemShellExecute.execute, path <" + pathname + "> too long", {}, 0);
}
preprocessed_command = pathname;
wchar_t path[MAX_LONG_PATH];
wcscpy_s(path, o3tl::toW(pathname.getStr()));
for (int i = 0;; ++i) {
@ -337,6 +336,7 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
}
}
}
preprocessed_command = resulting_path;
}
}