Filenames in VS2022 and other compilers are valid even if they contain dashes or spaces. However, the interceptor does not correctly account for when these filenames are passed on, as they are often wrapped in quotation marks, which breaks our regex for detecting file names.
This change splits our regex logic so that we first look for filenames surrounded by quotes (ex. "hello world.c", "hello-world.c") and then filenames without quotes (helloworld.c). Later, when passing these filenames into the link stages, we make sure to re-apply quotation marks to ensure the interception linker correctly handles them as well.
Filenames in VS2022 and other compilers are valid even if they contain dashes or spaces. However, the interceptor does not correctly account for when these filenames are passed on, as they are often wrapped in quotation marks, which breaks our regex for detecting file names.
This change splits our regex logic so that we first look for filenames surrounded by quotes (ex. "hello world.c", "hello-world.c") and then filenames without quotes (helloworld.c). Later, when passing these filenames into the link stages, we make sure to re-apply quotation marks to ensure the interception linker correctly handles them as well.