We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05a8048 commit c30661aCopy full SHA for c30661a
src/utils/fs.ts
@@ -46,12 +46,12 @@ export const write = async (destination: string, entity: FSEntity): Promise<void
46
switch (entity.type) {
47
case 'FILE': {
48
const normalizedEntityName = normalizeFilePath(entity.name);
49
- const filePath = path.join(destination, normalizedEntityName);
+ const filePath = path.resolve(destination, normalizedEntityName);
50
await fs.outputFile(filePath, entity.content);
51
break;
52
}
53
case 'DIRECTORY': {
54
- const directoryPath = path.join(destination, entity.name);
+ const directoryPath = path.resolve(destination, entity.name);
55
await fs.mkdirp(directoryPath);
56
for (const contentEntity of entity.content) {
57
await write(directoryPath, contentEntity);
0 commit comments