switch to reading read-only
There is no need to writing into the journals
This commit is contained in:
parent
8e07c4bf66
commit
6aeafe34c3
@ -209,7 +209,7 @@ static EDErrorCode ed_journal_file_load(EDJournalFile *self,
|
||||
EDJournalFilePrivate *p = ed_journal_file_get_instance_private(self);
|
||||
|
||||
GFile *file = NULL;
|
||||
GFileIOStream *stream = NULL;
|
||||
GFileInputStream *stream = NULL;
|
||||
GDataInputStream *reader = NULL;
|
||||
EDJournalEntry *entry = NULL;
|
||||
GError *e = NULL;
|
||||
@ -219,15 +219,13 @@ static EDErrorCode ed_journal_file_load(EDJournalFile *self,
|
||||
file = g_file_new_for_path(p->filename);
|
||||
goto_if_true(file == NULL, done);
|
||||
|
||||
stream = g_file_open_readwrite(file, NULL, &e);
|
||||
stream = g_file_read(file, NULL, &e);
|
||||
if (stream == NULL) {
|
||||
g_propagate_error(error, e);
|
||||
goto done;
|
||||
}
|
||||
|
||||
reader = g_data_input_stream_new(
|
||||
g_io_stream_get_input_stream(G_IO_STREAM(stream))
|
||||
);
|
||||
reader = g_data_input_stream_new(G_INPUT_STREAM(stream));
|
||||
if (reader == NULL) {
|
||||
goto done;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user