diff options
author | Damon Chaplin <damon@ximian.com> | 2002-05-09 20:49:46 +0000 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2002-05-09 20:49:46 +0000 |
commit | d9618fc61e3420c2b4bebebf89566c604af8b4ee (patch) | |
tree | 9fc3844d8cbe46cb334e82835ed41e93b6c04041 | |
parent | 6c78446b5d6eb12c5a9d5ca63fbacd4693ffba46 (diff) | |
download | nautilus-d9618fc61e3420c2b4bebebf89566c604af8b4ee.tar.gz |
if the file size is 0, just report loading is complete and return. Fixes
2002-05-09 Damon Chaplin <damon@ximian.com>
* components/text/nautilus-text-view.c (read_file_callback): if the
file size is 0, just report loading is complete and return.
Fixes bug #79745.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | components/text/nautilus-text-view.c | 7 |
2 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2002-05-09 Damon Chaplin <damon@ximian.com> + + * components/text/nautilus-text-view.c (read_file_callback): if the + file size is 0, just report loading is complete and return. + Fixes bug #79745. + 2002-05-09 Alex Larsson <alexl@redhat.com> * src/file-manager/fm-icon-view.c: (fm_icon_view_update_menus): diff --git a/components/text/nautilus-text-view.c b/components/text/nautilus-text-view.c index a693a2053..547dd07f9 100644 --- a/components/text/nautilus-text-view.c +++ b/components/text/nautilus-text-view.c @@ -118,6 +118,13 @@ read_file_callback (GnomeVFSResult result, return; } + /* If the file has zero size file_contents will be NULL, so we just + report loading is complete and return. */ + if (file_size == 0) { + nautilus_view_report_load_complete (view); + return; + } + /* Find first embedded zero, if any */ length = my_strnlen (file_contents, file_size); |