fix(smartfs.provider.node): Default createDirectory to recursive=true when option not provided in Node provider
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartfs',
|
||||
version: '1.1.2',
|
||||
version: '1.1.3',
|
||||
description: 'a cross platform extendable fs module'
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ export class SmartFsProviderNode implements ISmartFsProvider {
|
||||
|
||||
public async createDirectory(path: string, options?: { recursive?: boolean; mode?: number }): Promise<void> {
|
||||
await fs.mkdir(path, {
|
||||
recursive: options?.recursive,
|
||||
recursive: options?.recursive ?? true,
|
||||
mode: options?.mode,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user