When specifying a namespace with an absolute file path (starting with /) the file was not being found as the namespace was used as part of the path.
This commit is contained in:
Victor M. Alvarez
2021-11-18 10:29:53 +01:00
parent 6284650806
commit e21982a77f
+3 -3
View File
@@ -90,9 +90,9 @@ bool compile_files(YR_COMPILER* compiler, int argc, const char_t** argv)
colon = (char_t*) _tcschr(argv[i], ':');
}
// The namespace delimiter must be a colon not followed by a slash or
// backslash.
if (colon && *(colon + 1) != '\\' && *(colon + 1) != '/')
// The namespace delimiter must be a colon not followed by a backslash,
// as :\ is the separator for a drive letter in Windows.
if (colon && *(colon + 1) != '\\')
{
file_name = colon + 1;
*colon = '\0';