@social-mail/social-mail-web-server 1.9.14 → 1.9.15

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.9.14",
3
+ "version": "1.9.15",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -251,19 +251,13 @@ export default class BaseDiskCache {
251
251
  private async getFileStats() {
252
252
  const files = [] as { path: string, size: number, time: number }[];
253
253
  const dir = await fsp.opendir(this.root, { recursive: true });
254
- try {
255
- for await (const entry of dir) {
256
- if (!entry.isFile()) {
257
- continue;
258
- }
259
- const f = join(entry.parentPath, entry.name);
260
- const s = await stat(f);
261
- files.push({ path: f, size: s.size, time: s.ctimeMs });
254
+ for await (const entry of dir) {
255
+ if (!entry.isFile()) {
256
+ continue;
262
257
  }
263
- } catch (error) {
264
- console.error(error);
265
- } finally {
266
- await dir.close();
258
+ const f = join(entry.parentPath, entry.name);
259
+ const s = await stat(f);
260
+ files.push({ path: f, size: s.size, time: s.ctimeMs });
267
261
  }
268
262
  return files;
269
263
  }