remove unused code
This commit is contained in:
parent
e28475c5aa
commit
66962106d3
|
|
@ -11,7 +11,7 @@ const isImageProcessable = async (filePath: string): Promise<boolean> =>
|
||||||
.then(() => true)
|
.then(() => true)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
consoleLogger.error(
|
consoleLogger.error(
|
||||||
`Reading metadata from ${filePath} produced the following error: ${err.message}`
|
`Reading metadata from ${filePath} produced the following error: ${err.message}`,
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
@ -21,14 +21,12 @@ export const walk = async (dirPath: string): Promise<Folders> => {
|
||||||
withFileTypes: true,
|
withFileTypes: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
dirEnts.filter((f) => f.isFile());
|
|
||||||
|
|
||||||
const numberOfFiles = (
|
const numberOfFiles = (
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
dirEnts
|
dirEnts
|
||||||
.filter((f) => f.isFile())
|
.filter((f) => f.isFile())
|
||||||
.map((f) => path.posix.join(publicPath, dirPath, f.name))
|
.map((f) => path.posix.join(publicPath, dirPath, f.name))
|
||||||
.map(isImageProcessable)
|
.map(isImageProcessable),
|
||||||
)
|
)
|
||||||
).filter((a) => a).length;
|
).filter((a) => a).length;
|
||||||
|
|
||||||
|
|
@ -36,7 +34,7 @@ export const walk = async (dirPath: string): Promise<Folders> => {
|
||||||
dirEnts
|
dirEnts
|
||||||
.filter((d) => d.isDirectory())
|
.filter((d) => d.isDirectory())
|
||||||
.filter((d) => !d.name.includes(thumbnailPath.substring(1)))
|
.filter((d) => !d.name.includes(thumbnailPath.substring(1)))
|
||||||
.map((d) => walk(path.posix.join(dirPath, d.name)))
|
.map((d) => walk(path.posix.join(dirPath, d.name))),
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue