Merge lp:~giacky98/scratch/fix-1112710-not-saving-empty-files into lp:~elementary-apps/scratch/scratch

Proposed by Giacomo De Lazzari
Status: Merged
Approved by: Mario Guerriero
Approved revision: 996
Merged at revision: 1004
Proposed branch: lp:~giacky98/scratch/fix-1112710-not-saving-empty-files
Merge into: lp:~elementary-apps/scratch/scratch
Diff against target: 15 lines (+5/-0)
1 file modified
src/Widgets/Tab.vala (+5/-0)
To merge this branch: bzr merge lp:~giacky98/scratch/fix-1112710-not-saving-empty-files
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+150897@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Widgets/Tab.vala'
2--- src/Widgets/Tab.vala 2013-02-12 19:57:43 +0000
3+++ src/Widgets/Tab.vala 2013-02-27 20:07:24 +0000
4@@ -139,6 +139,11 @@
5 try {
6
7 document.filename = this.filename;
8+
9+ if (document.file.query_exists () == false) {
10+ FileOutputStream file_out_stream = document.file.create (FileCreateFlags.NONE);
11+ file_out_stream.close();
12+ }
13
14 uint8[] data = text_view.buffer.text.data;
15 string s;

Subscribers

People subscribed via source and target branches