diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 986759cf63c..d1ec0b98f25 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -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()); } } diff --git a/scripts/kconfig/zconf.lex.c_shipped b/scripts/kconfig/zconf.lex.c_shipped index b4aa7206ce3..7c3a9b318c7 100644 --- a/scripts/kconfig/zconf.lex.c_shipped +++ b/scripts/kconfig/zconf.lex.c_shipped @@ -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()); } }