ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/java/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
(Generate patch)

Comparing java/installer2/src/net/oni2/aeinstaller/gui/MainWin.java (file contents):
Revision 852 by alloc, Fri May 3 12:25:21 2013 UTC vs.
Revision 857 by alloc, Fri May 3 21:52:50 2013 UTC

# Line 215 | Line 215 | public class MainWin extends JFrame impl
215  
216          @DoInBackground(progressMessage = "updateDepot.title", cancelable = false, indeterminateProgress = false)
217          private void execDepotUpdate(final BackgroundEvent evt) {
218 <                DepotManager.loadFromCacheFile(Paths.getDepotCacheFilename());
219 <
218 >                boolean hasUpdated = false;
219                  if (!RuntimeOptions.isOfflineMode()
220                                  && !RuntimeOptions.isNoCacheUpdateMode()) {
221                          long start = new Date().getTime();
222  
223 <                        if (DepotManager.getInstance().updateInformation())
223 >                        if ((hasUpdated = DepotManager.getInstance().updateInformation())) {
224                                  DepotManager.getInstance().saveToCacheFile(
225                                                  Paths.getDepotCacheFilename());
226 +                        }
227  
228                          System.out.println("Took: " + (new Date().getTime() - start)
229                                          + " msec");
230                  }
231  
232 <                PackageManager.getInstance().init();
232 >                if (hasUpdated || !Paths.getPacManCacheFilename().exists()) {
233 >                        PackageManager.getInstance().init();
234 >                        PackageManager.getInstance().saveToCacheFile(
235 >                                        Paths.getPacManCacheFilename());
236 >                } else
237 >                        PackageManager.loadFromCacheFile(Paths.getPacManCacheFilename());
238                  tblMods.reloadData();
239                  initModTypeBox();
240  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)