Skip to content

Commit c30661a

Browse files
committed
fix: revert join to resolve
1 parent 05a8048 commit c30661a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/fs.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ export const write = async (destination: string, entity: FSEntity): Promise<void
4646
switch (entity.type) {
4747
case 'FILE': {
4848
const normalizedEntityName = normalizeFilePath(entity.name);
49-
const filePath = path.join(destination, normalizedEntityName);
49+
const filePath = path.resolve(destination, normalizedEntityName);
5050
await fs.outputFile(filePath, entity.content);
5151
break;
5252
}
5353
case 'DIRECTORY': {
54-
const directoryPath = path.join(destination, entity.name);
54+
const directoryPath = path.resolve(destination, entity.name);
5555
await fs.mkdirp(directoryPath);
5656
for (const contentEntity of entity.content) {
5757
await write(directoryPath, contentEntity);

0 commit comments

Comments
 (0)