Save after Save as: changes saved to the original file

Description

Open a file in Ocelot, edit a target and save to a new file by using the "Save as" command.
The title bar displays the name of the new file.
However editing the document and using the "Save" command result in saving the changes to the original document.

Environment

None

Activity

Show:
Marta Borriello
May 8, 2017, 8:12 AM

When performing the "Save as" command, the openFile field in OcelotApp wasn't replaced with the new file. So subsequent "Save" commands kept saving changes to the original file.

I've just added a line that updates the openFile field at the end of the saving operation.

Phil Ritchie
May 25, 2017, 1:14 PM
Edited

This issue is still reproduceable in my rc5 build. It's actually quite serious as now it doesn't seem to save at all even if you do not use Save As.

Chase Tingley
May 26, 2017, 7:14 PM
Edited

I thought this was platform-dependent, but it's not: it's configuration-dependent. It occurs when there are no plugins installed.

Actually I'm not quite sure what's going on here, this appears to be an exception thrown during a typecast.

Stack:

Chase Tingley
May 26, 2017, 7:36 PM

Fixed. This bug was occurring when there were no plugins installed that producing timing data. In that case, the null Double value was being autoboxed to double to pass to OkapiXliffService#setTime; this caused a NullPointerException that was logged to console and aborted the save action.

Marta Borriello
May 29, 2017, 8:28 AM

Well done! I wasn't able to spot that error.
Just taken a note for the next time: always run at least one test with no plugins installed.

Fixed

Assignee

Chase Tingley

Reporter

Marta Borriello

Labels

None

Priority

Major