Replies: 1 comment
-
We haven't seen this behavior. Do you have any more repro details? We're not aware of any feature that updates a file, unless if you have some sort of auto-formatting enabled. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
when installs and enables cpptools in vscode on windows, open the C++ code directory through vscode, and then open a file, such as: a.h, sometimes the git status of the file will change to modified, and compare the file content by binary, but we have not made any changes to the file ,there is no difference in one byte including carriage return, space, tab key, etc.
After disabling the plugin there is no such problem.
Using the Procmon.exe tool to monitor, it is found that code.exe does open and write files through functions such as CreateFileW, WriteFile, and FlushFileBuffers. The content of the file has not changed after writing (presumably the same content is written), but the file time is different change.
Try to write a test program, call CreateFileW, ReadFile, WriteFile, FlushFileBuffers functions to simulate writing the same content. After execution, the file time changed, and the git status does not change to modified.
which is in line with expectations.
Why does cpptools open files with this change?
Beta Was this translation helpful? Give feedback.
All reactions