mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
fix: fix create dir on Windows
This commit is contained in:
@@ -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 ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user