Changeset 1337 for trunk


Ignore:
Timestamp:
04/30/19 13:42:57 (5 years ago)
Author:
bln4
Message:

Committed a fix to hopefully address the File modify conflict issue (or at least some of the situations it occurs). I have noticed that the times that cause problems are when there is a version 0 frame being saved. I do not completely understand why this is happening or why it triggers the conflict check, but it appears that version 0 frames do not exist in memory for long, being overridden almost instantly. Maybe something to do with how frames are created?

Prior to this we found that the problem could be forced by creating a new frameset, adding the @old annotation and then navigating away, this no longer occurs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/FrameIO.java

    r1330 r1337  
    12311231                                        framesetName.equalsIgnoreCase(MessageBay.MESSAGES_FRAMESET_NAME) ||
    12321232                                        framesetName.equalsIgnoreCase(MailBay.EXPEDITEE_MAIL_FRAMESET_NAME);
     1233                        long fileLastModify = fullPath != null ? new File(fullPath).lastModified() : 0;
    12331234                        long frameLastModify = toSave.getLastModifyPrecise();
    1234                         long fileLastModify = new File(toSave.getFramePathReal()).lastModified();
    12351235                        boolean fileModifyConflict = fileLastModify > frameLastModify && !isBayFrameset;
    12361236                        boolean versionConflict = savedVersion > toSave.getVersion() && !isBayFrameset;
    1237                         if (fileModifyConflict || versionConflict) {
     1237                        if ((fileModifyConflict || versionConflict) && savedVersion > 0) {
    12381238                                // remove this frame from the cache if it is there
    12391239                                // This will make sure links to the original are set correctly
Note: See TracChangeset for help on using the changeset viewer.