search for: opennativefileinternal

Displaying 3 results from an estimated 3 matches for "opennativefileinternal".

2020 Apr 17
2
clang-format sets executable permission on windows (openNativeFile ignores mode on Windows)
...modifies when using the -i parameter. I spent some time troubleshooting this issue today, and I found that clang-format create a new temporary file, writes the formatted source into that file, then copies it over the old file. Deep in the bowels of openNativeFile in lib/Support/Windows/Path.inc, in openNativeFileInternal, CreateFileW is called with a SECURITY_ATTRIBUTES with lpSecurityDescriptor = nullptr. The result of this is you get a new file with the default permissions based on whatever NTFS decides to do. On my machine, this ends up being a file with 755 mode. This is happening because the mode parameter to...
2020 Apr 20
4
clang-format sets executable permission on windows (openNativeFile ignores mode on Windows)
...modifies when using the -i parameter. I spent some time troubleshooting this issue today, and I found that clang-format create a new temporary file, writes the formatted source into that file, then copies it over the old file. Deep in the bowels of openNativeFile in lib/Support/Windows/Path.inc, in openNativeFileInternal, CreateFileW is called with a SECURITY_ATTRIBUTES with lpSecurityDescriptor = nullptr. The result of this is you get a new file with the default permissions based on whatever NTFS decides to do. On my machine, this ends up being a file with 755 mode. This is happening because the mode parameter to...
2020 Apr 20
2
clang-format sets executable permission on windows (openNativeFile ignores mode on Windows)
...the -i parameter. > I spent some time troubleshooting this issue today, and I found that > clang-format create a new temporary file, writes the formatted source into > that file, then copies it over the old file. Deep in the bowels of > openNativeFile in lib/Support/Windows/Path.inc, in openNativeFileInternal, > CreateFileW is called with a SECURITY_ATTRIBUTES with lpSecurityDescriptor > = nullptr. The result of this is you get a new file with the default > permissions based on whatever NTFS decides to do. On my machine, this ends > up being a file with 755 mode. This is happening because th...