Skip to content
Snippets Groups Projects
Unverified Commit a091a953 authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

fix(fs): only ensureDir non-empty string (#10177)

parent 72dce18e
No related branches found
No related tags found
No related merge requests found
import is from '@sindresorhus/is';
import * as fs from 'fs-extra';
import { isAbsolute, join, parse } from 'upath';
import { getAdminConfig } from '../../config/admin';
......@@ -65,7 +66,9 @@ export async function renameLocalFile(
// istanbul ignore next
export async function ensureDir(dirName: string): Promise<void> {
await fs.ensureDir(dirName);
if (is.nonEmptyString(dirName)) {
await fs.ensureDir(dirName);
}
}
// istanbul ignore next
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment