fix: fix create dir on Windows

This commit is contained in:
purocean
2021-12-09 19:28:53 +08:00
parent dfab9a76b7
commit 3a83e42806
+1 -1
View File
@@ -54,7 +54,7 @@ export function write (repo: string, p: string, content: any): Promise<string> {
return withRepo(repo, async (_, filePath) => {
// create dir.
if (filePath.endsWith('/')) {
if (filePath.endsWith(path.sep)) {
await fs.ensureDir(filePath)
return ''
}