diff -r 8a68afaf1ba2 -r 506e35e424d5 eric7/WebBrowser/PageScreenDialog.py --- a/eric7/WebBrowser/PageScreenDialog.py Thu Jun 16 18:28:59 2022 +0200 +++ b/eric7/WebBrowser/PageScreenDialog.py Fri Jun 17 16:36:14 2022 +0200 @@ -7,7 +7,9 @@ Module implementing a dialog to save a screenshot of a web page. """ -from PyQt6.QtCore import pyqtSlot, Qt, QFile, QFileInfo, QSize, QIODevice +import pathlib + +from PyQt6.QtCore import pyqtSlot, Qt, QFile, QSize, QIODevice from PyQt6.QtGui import QImage, QPainter, QPixmap from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QAbstractButton @@ -75,7 +77,7 @@ if not fileName: return False - if QFileInfo(fileName).exists(): + if pathlib.Path(fileName).exists(): res = EricMessageBox.yesNo( self, self.tr("Save Page Screen"),