@less-is-more/less-js 1.5.0-6 → 1.5.0-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/nas.js +1 -6
package/package.json
CHANGED
package/src/nas.js
CHANGED
|
@@ -190,18 +190,13 @@ class Nas {
|
|
|
190
190
|
const expireTime = parseInt(expireTimeString);
|
|
191
191
|
|
|
192
192
|
if (!isNaN(expireTime) && expireTime !== -1 && Date.now() > expireTime) {
|
|
193
|
+
console.log("删除过期缓存文件:", filePath);
|
|
193
194
|
// 文件已过期,删除文件
|
|
194
195
|
fs.unlinkSync(filePath);
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
198
|
} catch (e) {
|
|
198
199
|
console.warn("检查缓存文件过期时间失败:", filePath, e);
|
|
199
|
-
// 如果检查失败,尝试直接删除文件
|
|
200
|
-
try {
|
|
201
|
-
fs.unlinkSync(filePath);
|
|
202
|
-
} catch (deleteError) {
|
|
203
|
-
console.warn("删除缓存文件失败:", filePath, deleteError);
|
|
204
|
-
}
|
|
205
200
|
}
|
|
206
201
|
}
|
|
207
202
|
}
|