build: fixes issue in windows Kconfig support
It allows to silently ignore non-existent files. When using wildcards in Kconfig source files (e.g. source folder/*/Kconfig), it is possible to refer files that does not exist. In the previous example, it is possible that Kconfig files do not exist in one of the folder's subfolders and it is not a requirement for the file to exist in each one of the subfolders. Additionally, it fixes an issue for wildcards in the file name. If the name contains a wildcard, Kconfig should iterate over each file included in the wildcard (e.g source folder/myKconfig.*) Jira: ZEP-177 Change-Id: I5aa192ca1e2df83461b12a86fe29a98cd95c4256 Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
This commit is contained in:
parent
51503a2388
commit
0e40db8a3b
@ -407,8 +407,13 @@ void win_process_files(const char *files_path)
|
||||
|
||||
if (hFind != INVALID_HANDLE_VALUE) {
|
||||
do {
|
||||
char *strfile;
|
||||
GetFullPathName(fullname, PATH_MAX, path, lppPart);
|
||||
strcpy(fullname, path);
|
||||
strfile = strrchr(fullname, '\\');
|
||||
if(strfile){
|
||||
sprintf(strfile, "\\%s", FindFileData.cFileName);
|
||||
}
|
||||
zconf_nextfile(fullname);
|
||||
} while (FindNextFile(hFind, &FindFileData) != 0);
|
||||
|
||||
@ -417,8 +422,6 @@ void win_process_files(const char *files_path)
|
||||
if (dwError != ERROR_NO_MORE_FILES) {
|
||||
printf ("Error processing '%s' #%lu.\n", fullname, dwError);
|
||||
}
|
||||
} else {
|
||||
printf ("Error processing '%s' #%lu.\n", fullname, GetLastError());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2462,8 +2462,13 @@ void win_process_files(const char *files_path)
|
||||
|
||||
if (hFind != INVALID_HANDLE_VALUE) {
|
||||
do {
|
||||
char *strfile;
|
||||
GetFullPathName(fullname, PATH_MAX, path, lppPart);
|
||||
strcpy(fullname, path);
|
||||
strfile = strrchr(fullname, '\\');
|
||||
if(strfile){
|
||||
sprintf(strfile, "\\%s", FindFileData.cFileName);
|
||||
}
|
||||
zconf_nextfile(fullname);
|
||||
} while (FindNextFile(hFind, &FindFileData) != 0);
|
||||
|
||||
@ -2472,8 +2477,6 @@ void win_process_files(const char *files_path)
|
||||
if (dwError != ERROR_NO_MORE_FILES) {
|
||||
printf ("Error processing '%s' #%lu.\n", fullname, dwError);
|
||||
}
|
||||
} else {
|
||||
printf ("Error processing '%s' #%lu.\n", fullname, GetLastError());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user