~ubuntu-branches/ubuntu/raring/nano/raring

« back to all changes in this revision

Viewing changes to debian/patches/successful_write_no_free_space.patch

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach
  • Date: 2008-08-25 17:27:55 UTC
  • mfrom: (13.1.6 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080825172755-f7nqabuhghz16a5u
Tags: 2.0.7-4
* The "Valencia, tenemos la fórmula" release.
* Add patch successful_write_no_free_space.patch to solve an issue
  with nano reporting successful writes on full devices, potentially
  causing files to be zeroed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- nano/src/files.c    2008/05/31 23:12:34     4261
 
2
+++ nano/src/files.c    2008/08/17 00:10:34     4305
 
3
@@ -1704,8 +1704,11 @@
 
4
                strerror(errno));
 
5
            goto cleanup_and_exit;
 
6
        }
 
7
-    } else
 
8
-       fclose(f);
 
9
+    } else if (fclose(f) != 0) {
 
10
+           statusbar(_("Error writing %s: %s"), realname,
 
11
+               strerror(errno));
 
12
+           goto cleanup_and_exit;
 
13
+    }
 
14
 
 
15
     if (!tmp && append == OVERWRITE) {
 
16
        if (!nonamechange) {