fix isFolder

This commit is contained in:
Abhinav 2023-02-07 13:30:11 +05:30
parent 8ac3523c13
commit 26675f750a

View file

@ -184,12 +184,12 @@ export const getZipFileStream = async (
};
export async function isFolder(dirPath: string) {
return await fs
.stat(dirPath)
.then((stats) => {
return stats.isDirectory();
})
.catch(() => false);
try {
const stats = await fs.stat(dirPath);
return stats.isDirectory();
} catch (e) {
return false;
}
}
export const convertBrowserStreamToNode = (