Changeset 28874

Show
Ignore:
Timestamp:
05.03.2014 14:40:02 (6 years ago)
Author:
kjdon
Message:

in reset token file, only try to create a new file if one doesn't exist. otherwise we just write over the top.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/OAIResumptionToken.java

    r28872 r28874  
    251251                     FILE_SEPARATOR + "OAIResumptionToken.xml"); 
    252252    try { 
    253       if (!resumption_token_file.createNewFile()) { 
    254     logger.error("Couldn't create a new resumption token file "+ resumption_token_file.getPath()); 
    255     resumption_token_file = null; 
    256     return false; 
     253      if (!resumption_token_file.exists()) { 
     254 
     255    if (!resumption_token_file.createNewFile()) { 
     256      logger.error("Couldn't create a new resumption token file "+ resumption_token_file.getPath()); 
     257      resumption_token_file = null; 
     258      return false; 
     259    } 
    257260      } 
    258261    } catch (Exception e) {