After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721632 - Stop reading binary files after, say, 1kB
Stop reading binary files after, say, 1kB
Status: RESOLVED DUPLICATE of bug 781375
Product: gtksourceview
Classification: Platform
Component: File loading and saving
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
: 669880 743463 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-01-06 12:48 UTC by Fabian Greffrath
Modified: 2017-04-25 09:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Fabian Greffrath 2014-01-06 12:48:45 UTC
Hi,

it happens that I accidently open binary files in gedit that may be rather huge, e.g. "gedit *" in a source directory that is not yet cleaned up and still contains object files. It then takes ages for gedit to process these files. It finishes with showing me an error message that the file it just opened contains illegal symbols and that editing it might not turn out as expected.

This information, however, is already known after reading a few bytes, say 1kB, of that file. I think it would be better if gedit stopped reading it and asking me to continue than attempting to read it in as a whole, blocking the UI and then giving me the error message.

 - Fabian
Comment 1 Sébastien Wilmet 2014-01-06 20:17:44 UTC
It should at least be possible to cancel a file loading, see bug #699839 for that.

But I agree, it would also be nice to detect binary files, when there are lots of invalid characters.
Comment 2 Sébastien Wilmet 2015-01-13 15:15:44 UTC
*** Bug 669880 has been marked as a duplicate of this bug. ***
Comment 3 Sébastien Wilmet 2015-01-25 10:30:09 UTC
*** Bug 743463 has been marked as a duplicate of this bug. ***
Comment 4 Sébastien Wilmet 2017-04-25 09:25:20 UTC

*** This bug has been marked as a duplicate of bug 781375 ***