--- a/src/eric7/Plugins/VcsPlugins/vcsGit/GitSubmodulesStatusDialog.py Mon Dec 12 19:50:37 2022 +0100 +++ b/src/eric7/Plugins/VcsPlugins/vcsGit/GitSubmodulesStatusDialog.py Tue Dec 13 14:03:13 2022 +0100 @@ -8,8 +8,6 @@ project. """ -import os - from PyQt6.QtCore import QProcess, Qt, pyqtSlot from PyQt6.QtWidgets import ( QAbstractButton, @@ -65,11 +63,9 @@ @type str """ # find the root of the repo - self.__repodir = projectDir - while not os.path.isdir(os.path.join(self.__repodir, self.__vcs.adminDir)): - self.__repodir = os.path.dirname(self.__repodir) - if os.path.splitdrive(self.__repodir)[1] == os.sep: - return + self.__repodir = self.__vcs.findRepoRoot(projectDir) + if not self.__repodir: + return self.errorGroup.hide() self.errors.clear()