src/eric7/QScintilla/Editor.py

branch
eric7
changeset 10142
083fc88c9471
parent 10069
435cc5875135
child 10148
31ba20629af4
child 10180
3a595df36c9a
diff -r ff4187bfe28d -r 083fc88c9471 src/eric7/QScintilla/Editor.py
--- a/src/eric7/QScintilla/Editor.py	Sun Jul 30 14:35:52 2023 +0200
+++ b/src/eric7/QScintilla/Editor.py	Sun Jul 30 17:31:07 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