SUMMARY Error prompted "Can't compare file with folder" when using kdiff3 to compare two folders from command-line. I read the source code, maybe need to check m_sd3 is empty when doing directory compare cause the third folder is optional. ``` - if((m_bDirCompare && (!m_sd2->isDir() || !m_sd3->isDir())) || + if((m_bDirCompare && (!m_sd2->isDir() || (!m_sd3->isEmpty() && !m_sd3->isDir()))) || (!m_bDirCompare && (m_sd2->isDir() || m_sd3->isDir()))) { ... } ``` STEPS TO REPRODUCE 1. install kdiff3-git from AUR 2. execute "kdiff3 folder1 folder2" 3. OBSERVED RESULT KMessageBox popped with "Can't compare file with folder" EXPECTED RESULT No "Can't compare file with folder" prompted SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
Git commit b0337052834dbba7dcd4aa15d05641b99b1e6b89 by Michael Reeves. Committed on 25/11/2023 at 02:41. Pushed by mreeves into branch 'master'. Fix false error comparing two folders M +1 -1 src/kdiff3.cpp https://invent.kde.org/sdk/kdiff3/-/commit/b0337052834dbba7dcd4aa15d05641b99b1e6b89