From d34c39e4ff0e6b9909afd6dfcff54fa1bd4532ba Mon Sep 17 00:00:00 2001 From: Don Ho Date: Thu, 19 Dec 2024 05:44:30 +0100 Subject: [PATCH] Code enhancement: remove obsolete code The removed code in this commit were added for working around Microsoft ReadDirectoryChanges notification issue: https://github.com/notepad-plus-plus/notepad-plus-plus/commit/1a97d3c8543a7dada1063eae70463f59497a2797 Apparently the issue has been fixed. The following issue has been tested with this commit, no issue found: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/5591#issuecomment-487313886 This commit could remedy #15819. --- PowerEditor/src/NppBigSwitch.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index 85f44b0b8236..b4548ac88d2e 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -2176,17 +2176,6 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa case NPPM_INTERNAL_CHECKDOCSTATUS: { - // This is an workaround to deal with Microsoft issue in ReadDirectoryChanges notification - // If command prompt is used to write file continuously (e.g. ping -t 8.8.8.8 > ping.log) - // Then ReadDirectoryChanges does not detect the change. - // Fortunately, notification is sent if right click or double click happens on that file - // Let's leverage this as workaround to enhance npp file monitoring functionality. - // So calling "doesFileExist" is a workaround here. - - Buffer* currBuf = getCurrentBuffer(); - if (currBuf && currBuf->isMonitoringOn()) - doesFileExist(currBuf->getFullPathName()); - const NppGUI & nppgui = nppParam.getNppGUI(); if (nppgui._fileAutoDetection != cdDisabled) {