-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add trailing periods support to FindFirstFileA
#75
Conversation
Removed the wildcard assert since the CI test passes a wildcard to |
@@ -1368,17 +1379,19 @@ namespace kernel32 { | |||
} | |||
|
|||
unsigned int WIN_FUNC GetCurrentDirectoryA(unsigned int uSize, char *lpBuffer) { | |||
DEBUG_LOG("GetCurrentDirectoryA(%u, %p)\n", uSize, lpBuffer); | |||
DEBUG_LOG("GetCurrentDirectoryA(%u, %p)", uSize, lpBuffer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the \n?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the debug logs I added get printed in the same line
@@ -32,7 +32,6 @@ namespace files { | |||
return path; | |||
} | |||
|
|||
path = path.lexically_normal(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is important
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is duplicated, there's another lexically_normal
call above. Unless calling it twice is required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, definitely shouldn’t be required twice. Wonder how it got that way 🤔
Adds support to handle directories with trailing periods (ie
include/.
) passed toFindFirstFileA
and family.I couldn't find docs on how the function should behave in this case (https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-findfirstfilea), but assuming it means "find anything on the passed directory" makes the program happy.
This was needed by "GCC 2.95.3 SN 1.14's
cpp.exe
"I also added an assert in
FindFirstFileA
to check for wildcards and a few other unrelated logs. I can remove them if preferred.