Skip to content

Commit 3267452

Browse files
committed
extra fixes?
1 parent 1b4dcd4 commit 3267452

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/lib/pages/SongsTab.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
const res = await GetRootPath();
236236
const baseDir = './OpenTaiko/Songs';
237237
const baseDirPath = await path.join(res, baseDir);
238-
const localPath = `${baseDir}/${(currentObj !== null) ? currentObj.chartRelativePath : songObj.tjaFolderPath}`;
238+
const localPath = `${baseDir}/${(currentObj !== null) ? currentObj.chartRelativePath : songObj.tjaFolderPath}`.replace(/\\/g, '/');
239239
const tjaFullPath = await path.join(res, localPath);
240240
241241
let fold_exists = await exists(tjaFullPath);
@@ -256,7 +256,7 @@
256256
for (const filePath of songObj.tjaFilesPath) {
257257
const localFileName = filePath.split("\\").pop();
258258
const tjaFileUrl = `https://raw.githubusercontent.com/OpenTaiko/OpenTaiko-Soundtrack/main/${filePath}`;
259-
const dlPath = await path.join(chartDownloadFolder, localFileName);
259+
const dlPath = await path.join(chartDownloadFolder, localFileName.replace(/\\/g, '/'));
260260
261261
262262
const success = await backoffDownload(
@@ -279,8 +279,8 @@
279279
280280
songDLProgress[songObj.uniqueId] = 0;
281281
await Promise.all(fileNames.map(async (fn, idx) => {
282-
const strPath = await path.join(chartDownloadFolder, fn);
283-
const destPath = await path.join(tjaFullPath, fn);
282+
const strPath = await path.join(chartDownloadFolder, fn.replace(/\\/g, '/'));
283+
const destPath = await path.join(tjaFullPath, fn.replace(/\\/g, '/'));
284284
285285
await copyFile(strPath, destPath);
286286
songDLProgress[songObj.uniqueId] = (idx + 1) * (100 / fileNames.length);

src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
// Move unzipped files to OpenTaiko folder
180180
progress = undefined;
181181
182-
const source_folder = folderName;
182+
const source_folder = folderName.replace(/\\/g, '/');
183183
await copyAllFilesRecursive(source_folder, optk_folder);
184184
185185

0 commit comments

Comments
 (0)