B2G/gecko/services/sync/modules/policies.js
// Deletes a file from oldLogs each tick until there are none left.
Deletes a file from oldLogs each tick until there are none left.
Deletes a file from oldLogs each tick until there are none left .
function deleteFile() {
      if (index >= oldLogs.length) {
        ErrorHandler._cleaningUpFileLogs = false;
        Svc.Obs.notify("weave:service:cleanup-logs");
        return;
      }
      try {
        oldLogs[index].remove(false);
      } catch (ex) {
        ErrorHandler._log._debug("Encountered error trying to clean up old log file '"
                                 + oldLogs[index].leafName + "':"
                                 + Utils.exceptionStr(ex));
      }
      index++;
      Utils.nextTick(deleteFile);
    }
function deleteFile ( ) { if ( index >= oldLogs . length ) { ErrorHandler . _cleaningUpFileLogs = false ; Svc . Obs . notify ( "weave:service:cleanup-logs" ) ; return ; } try { oldLogs [ index ] . remove ( false ) ; } catch ( ex ) { ErrorHandler . _log . _debug ( "Encountered error trying to clean up old log file '" + oldLogs [ index ] . leafName + "':" + Utils . exceptionStr ( ex ) ) ; } index ++ ; Utils . nextTick ( deleteFile ) ; }
Deletes a file from oldLogs each tick until there are none left.
Deletes a file from oldLogs each tick until there are none left .