src/eric7/QScintilla/Editor.py

branch
eric7-maintenance
changeset 10148
31ba20629af4
parent 10079
0222a480e93d
parent 10142
083fc88c9471
child 10222
1146cc8fbf5d
--- a/src/eric7/QScintilla/Editor.py	Sun Jul 02 17:40:17 2023 +0200
+++ b/src/eric7/QScintilla/Editor.py	Tue Aug 01 09:59:45 2023 +0200
@@ -405,7 +405,7 @@
                 if not Utilities.MimeTypes.isTextFile(self.fileName):
                     raise OSError()
 
-                if self.isLocalFile():
+                if self.isLocalFile() and pathlib.Path(self.fileName).exists():
                     fileSizeKB = pathlib.Path(self.fileName).stat().st_size // 1024
                     if fileSizeKB > Preferences.getEditor("RejectFilesize"):
                         EricMessageBox.warning(

eric ide

mercurial