--- a/eric6/QScintilla/Editor.py Sat May 01 16:01:43 2021 +0200 +++ b/eric6/QScintilla/Editor.py Sat May 01 18:48:35 2021 +0200 @@ -7595,10 +7595,7 @@ if not self.checkDirty(): return - package = ( - os.path.isdir(self.fileName) and - self.fileName or os.path.dirname(self.fileName) - ) + package = os.path.dirname(self.fileName) res = E5MessageBox.yesNo( self, self.tr("Imports Diagram"),