~artem-anufrij/scratch/Bugfix-1032565

« back to all changes in this revision

Viewing changes to src/Services/Document.vala

  • Committer: artem-anufrij
  • Date: 2014-11-09 10:52:51 UTC
  • mfrom: (1401.2.3 scratch)
  • Revision ID: artem-anufrij-20141109105251-92sigwyjv1bug80s
mergeĀ lp:scratch

Show diffs side-by-side

added added

removed removed

Lines of Context:
276
276
 
277
277
            // Replace old content with the new one
278
278
            try {
279
 
                string s;
280
 
                file.replace_contents (this.source_view.buffer.text.data, null, false, 0, out s);
 
279
                FileOutputStream fostream = file.replace (null, false, 0);
 
280
                fostream.write (this.source_view.buffer.text.data);              
 
281
                uint8[] eof = { '\n' };
 
282
                fostream.write (eof);
281
283
            } catch (Error e) {
282
284
                warning ("Cannot save \"%s\": %s", get_basename (), e.message);
283
285
                return false;
724
726
            mounted = false;
725
727
        }
726
728
    }
727
 
}
 
 
b'\\ No newline at end of file'
 
729
}