Do not consider same-creation time to be a stale status

Related commit:
7daf31336a
This commit is contained in:
Raymond Hill 2023-10-17 12:30:06 -04:00
parent 7daf31336a
commit f34855b859
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 9 additions and 14 deletions

View File

@ -82,7 +82,6 @@ const resourceIsStale = (networkDetails, cacheDetails) => {
if ( networkDetails.resourceTime === 0 ) { return false; } if ( networkDetails.resourceTime === 0 ) { return false; }
if ( typeof cacheDetails.resourceTime !== 'number' ) { return false; } if ( typeof cacheDetails.resourceTime !== 'number' ) { return false; }
if ( cacheDetails.resourceTime === 0 ) { return false; } if ( cacheDetails.resourceTime === 0 ) { return false; }
if ( networkDetails.resourceTime === cacheDetails.resourceTime ) { return true; }
if ( networkDetails.resourceTime < cacheDetails.resourceTime ) { if ( networkDetails.resourceTime < cacheDetails.resourceTime ) {
ubolog(`Skip ${networkDetails.url}\n\tolder than ${cacheDetails.remoteURL}`); ubolog(`Skip ${networkDetails.url}\n\tolder than ${cacheDetails.remoteURL}`);
return true; return true;

View File

@ -598,17 +598,13 @@ const exCharCodeAt = (s, i) => {
/******************************************************************************/ /******************************************************************************/
class argListParser { class argListParser {
constructor(separator = 0x2C /* , */, mustQuote = false) { constructor(separatorChar = ',', mustQuote = false) {
this.separatorCode = separator.charCodeAt(0); this.separatorChar = this.actualSeparatorChar = separatorChar;
this.separatorCode = this.actualSeparatorCode = separatorChar.charCodeAt(0);
this.mustQuote = mustQuote; this.mustQuote = mustQuote;
this.quoteBeg = 0; this.quoteBeg = 0; this.quoteEnd = 0;
this.argBeg = 0; this.argBeg = 0; this.argEnd = 0;
this.argEnd = 0; this.separatorBeg = 0; this.separatorEnd = 0;
this.quoteEnd = 0;
this.actualSeparatorCode = 0x2C /* , */;
this.actualSeparatorChar = ',';
this.separatorBeg = 0;
this.separatorEnd = 0;
this.transform = false; this.transform = false;
this.failed = false; this.failed = false;
this.reWhitespaceStart = /^\s+/; this.reWhitespaceStart = /^\s+/;
@ -617,7 +613,7 @@ class argListParser {
this.reUnescapeDoubleQuotes = /((?:^|[^\\])(?:\\\\)*)\\"/g; this.reUnescapeDoubleQuotes = /((?:^|[^\\])(?:\\\\)*)\\"/g;
this.reUnescapeSingleQuotes = /((?:^|[^\\])(?:\\\\)*)\\'/g; this.reUnescapeSingleQuotes = /((?:^|[^\\])(?:\\\\)*)\\'/g;
this.reUnescapeBackticks = /((?:^|[^\\])(?:\\\\)*)\\`/g; this.reUnescapeBackticks = /((?:^|[^\\])(?:\\\\)*)\\`/g;
this.reUnescapeCommas = /((?:^|[^\\])(?:\\\\)*)\\,/g; this.reUnescapeSeparator = new RegExp(`((?:^|[^\\\\])(?:\\\\\\\\)*)\\\\${this.separatorChar}`, 'g');
} }
nextArg(pattern, beg = 0) { nextArg(pattern, beg = 0) {
const len = pattern.length; const len = pattern.length;
@ -663,8 +659,8 @@ class argListParser {
default: default:
break; break;
} }
if ( s.includes(',') === false ) { return; } if ( s.includes(this.separatorChar) === false ) { return; }
return s.replace(this.reUnescapeCommas, '$1,'); return s.replace(this.reUnescapeSeparator, `$1${this.separatorChar}`);
} }
leftWhitespaceCount(s) { leftWhitespaceCount(s) {
const match = this.reWhitespaceStart.exec(s); const match = this.reWhitespaceStart.exec(s);