fixing bugs

This commit is contained in:
jakani24
2024-03-24 20:03:28 +01:00
parent 7cae4956cb
commit 3b450984b8
10 changed files with 9 additions and 11 deletions

View File

@@ -31,6 +31,7 @@ bool is_directory(const std::string& path) {
void process_changes(const FILE_NOTIFY_INFORMATION* pInfo) {
// Allocate a buffer for the file name and copy the content
std::wstring fileName(pInfo->FileName, pInfo->FileNameLength / sizeof(wchar_t));
fileName.push_back(L'\0'); //NULL-terminate the string
// Convert wstring to string
std::string filename_str(fileName.begin(), fileName.end());