Skip to content

Commit 5f01dcb

Browse files
authored
Merge pull request #13 from johnw-bluemark/windows-dir
stop creating directories ending with periods on Windows
2 parents 53b39c4 + eea4041 commit 5f01dcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import path from 'path'
44

55
export function write(dir: string, filename: string, data: Buffer) {
66
const file = path.join(dir, filename)
7-
fs.mkdirpSync(file.slice(0, file.lastIndexOf('/')))
7+
fs.mkdirpSync(path.dirname(file))
88
return fs.writeFileSync(file, data)
99
}
1010

0 commit comments

Comments
 (0)