Fix a bug in the Windows Builds:
With commit
80d6e681f ("MS Windows: Get a canonical paths name: Important if path length exceeds MAX_PATH, might happen when using PDKs", 2025-04-12)
the newly introduced function get_windows_canonical_path() does not do the
right thing when the path name is only a simple file name. Then internally
used function GetFullPathNameW() then will prepend the current directory to the
file name, which may be simply wrong.
This commit is contained in:
parent
0e8cc00070
commit
ecb288138f
|
|
@ -9867,6 +9867,10 @@ char* get_windows_canonical_path(const char* input_path) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* If plain filename, just copy it. */
|
||||
if (!strchr(input_path, '\\') && !strchr(input_path, '/'))
|
||||
return copy(input_path);
|
||||
|
||||
inputLenMB = (int)strlen(input_path);
|
||||
|
||||
if (inputLenMB == 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue