From 456d334bb4069d52219e98962dfa493380f7de69 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Mon, 19 Jan 2026 03:33:17 +0300 Subject: [PATCH] Fix assert failure related to .history on MSW. wxMSWFileSystemWatcher::AddTree only adds the root tree, not all subtrees like wxFileSystemWatcherBase::AddTree. --- kicad/project_tree_pane.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/kicad/project_tree_pane.cpp b/kicad/project_tree_pane.cpp index 5666417648..9d5f50d154 100644 --- a/kicad/project_tree_pane.cpp +++ b/kicad/project_tree_pane.cpp @@ -1575,34 +1575,6 @@ void PROJECT_TREE_PANE::FileWatcherReset() TO_UTF8( fn.GetFullPath() ) ); return; } - - // Explicitly remove .history directory and its descendants from the watch list. - // AddTree adds all subdirectories, but we don't want to watch .history (local backup). - wxFileName historyDir( prj_dir, wxEmptyString ); - historyDir.AppendDir( wxS( ".history" ) ); - - if( historyDir.DirExists() ) - { - wxDir dir( historyDir.GetPath() ); - - if( dir.IsOpened() ) - { - // Remove .history itself - m_watcher->Remove( historyDir ); - - // Remove all subdirectories of .history - wxString subdir; - bool cont = dir.GetFirst( &subdir, wxEmptyString, wxDIR_DIRS ); - - while( cont ) - { - wxFileName subdirFn( historyDir.GetPath(), wxEmptyString ); - subdirFn.AppendDir( subdir ); - m_watcher->Remove( subdirFn ); - cont = dir.GetNext( &subdir ); - } - } - } } #else if( !m_watcher->Add( fn ) )