@social-mail/social-mail-web-server 1.9.13 → 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
|
@@ -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
|
-
|
|
255
|
-
|
|
256
|
-
|
|
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
|
-
|
|
264
|
-
|
|
265
|
-
|
|
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
|
}
|