mirror of https://github.com/buggins/dlangui.git
fix saving of text files
This commit is contained in:
parent
173388fdff
commit
fdb965b45c
|
@ -124,7 +124,7 @@ class OutputLineStream {
|
||||||
}
|
}
|
||||||
protected void flush() {
|
protected void flush() {
|
||||||
if (_len > 0) {
|
if (_len > 0) {
|
||||||
_stream.write(_buf[0.._len]);
|
_stream.writeExact(_buf.ptr, _len);
|
||||||
_len = 0;
|
_len = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1063,7 +1063,7 @@ class EditableContent {
|
||||||
if (!filename)
|
if (!filename)
|
||||||
filename = _filename;
|
filename = _filename;
|
||||||
try {
|
try {
|
||||||
std.stream.File f = new std.stream.File(filename, FileMode.Out);
|
std.stream.File f = new std.stream.File(filename, FileMode.OutNew);
|
||||||
scope(exit) { f.close(); }
|
scope(exit) { f.close(); }
|
||||||
return save(f, filename, format);
|
return save(f, filename, format);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue