🐛 Fix move files error

This commit is contained in:
LittleSheep 2025-01-12 01:26:51 +08:00
parent 87ebd71d89
commit f12a4bc9c1

View File

@ -105,6 +105,10 @@ export async function downloadAssets(task: InstallTask): Promise<string | undefi
function moveFiles(from: string, to: string) {
const files = fs.readdirSync(from)
if (!fs.existsSync(to)) {
fs.mkdirSync(to, { recursive: true })
}
for (const file of files) {
const sourcePath = path.join(from, file)
const targetPath = path.join(to, file)