- Timestamp:
- 02/04/19 13:54:46 (5 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/FrameIO.java
r1229 r1232 961 961 public static String SaveFrame(Frame toSave, boolean inc, 962 962 boolean checkBackup) { 963 964 if (toSave.getName().startsWith("ExpediteeMail")) {965 System.err.println();966 }967 963 968 964 // TODO When loading a frame maybe append onto the event history too- 969 // with a 970 // break to indicate the end of a session 965 // with a break to indicate the end of a session 971 966 972 967 if (toSave == null || !toSave.hasChanged() || toSave.isSaved()) { … … 1031 1026 savedVersion = KMSReader.getVersion(fullPath); 1032 1027 } 1033 1028 1034 1029 // Check if the frame doesnt exist 1035 1030 // if (savedVersion < 0) { … … 1047 1042 // Check if we are trying to save an out of date version 1048 1043 String framesetName = toSave.getFramesetName(); 1044 long frameLastModify = toSave.getLastModifyPrecise(); 1045 long fileLastModify = new File(fullPath).lastModified(); 1046 boolean versionConflict = frameLastModify < fileLastModify; 1049 1047 boolean isBayFrameset = 1050 1048 framesetName.equalsIgnoreCase(MessageBay.MESSAGES_FRAMESET_NAME) || 1051 1049 framesetName.equalsIgnoreCase(MailBay.EXPEDITEE_MAIL_FRAMESET_NAME); 1052 if ( savedVersion > toSave.getVersion() && !isBayFrameset) {1050 if ((savedVersion > toSave.getVersion() || versionConflict) && !isBayFrameset) { 1053 1051 // remove this frame from the cache if it is there 1054 1052 // This will make sure links to the original are set correctly -
trunk/src/org/expeditee/io/DefaultFrameReader.java
r1226 r1232 20 20 21 21 import java.io.BufferedReader; 22 import java.io.File; 22 23 import java.io.FileInputStream; 23 24 import java.io.IOException; … … 178 179 179 180 public Frame readFrame(String fullPath) throws IOException { 181 File f = new File(fullPath); 180 182 Reader in = new InputStreamReader(new FileInputStream(fullPath), "UTF-8"); 181 return readFrame(new BufferedReader(in)); 183 Frame frame = readFrame(new BufferedReader(in)); 184 frame.setLastModifyDate(frame.getLastModifyDate(), f.lastModified()); 185 return frame; 182 186 } 183 187 } -
trunk/src/org/expeditee/io/ExpReader.java
r1207 r1232 90 90 String next = ""; 91 91 Frame newFrame = new Frame(); 92 92 93 93 try { 94 94 // Framename must be set before setting the frame number
Note:
See TracChangeset
for help on using the changeset viewer.