From 4c6b2e8247715b78a501eca0be6514c6f56c17a1 Mon Sep 17 00:00:00 2001 From: stromcon <6690149+stromcon@users.noreply.github.com> Date: Mon, 4 Oct 2021 03:47:16 +0200 Subject: [PATCH] Fix linux filesystem --- src/service/Ryujinx/shaders.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/service/Ryujinx/shaders.ts b/src/service/Ryujinx/shaders.ts index d3831729..f7301b81 100644 --- a/src/service/Ryujinx/shaders.ts +++ b/src/service/Ryujinx/shaders.ts @@ -38,8 +38,8 @@ const displayShadersErrorOnDownload = () => { export const installShadersToGame = async (config: IRyujinxConfig, titleId: string) => { progressEvent.dispatchEvent(new CustomEvent('progress', { detail: { progress: 0, open: true, downloadSpeed: 0 }})) - const shaderDestPath = getRyujinxPath(config, 'games', titleId, 'cache', 'shader', 'guest', 'program', 'cache.zip'); - const infoDestPath = getRyujinxPath(config, 'games', titleId, 'cache', 'shader', 'guest', 'program', 'cache.info'); + const shaderDestPath = getRyujinxPath(config, 'games', titleId.toLowerCase(), 'cache', 'shader', 'guest', 'program', 'cache.zip'); + const infoDestPath = getRyujinxPath(config, 'games', titleId.toLowerCase(), 'cache', 'shader', 'guest', 'program', 'cache.info'); const exists = await fs.promises.access(infoDestPath).then(() => true).catch(() => false); @@ -60,7 +60,7 @@ export const installShadersToGame = async (config: IRyujinxConfig, titleId: stri } // Clear compiled Shaders to avoid cache collision issue - rimraf(getRyujinxPath(config, 'games', titleId, 'cache', 'shader', 'opengl'), () => {}); + rimraf(getRyujinxPath(config, 'games', titleId.toLowerCase(), 'cache', 'shader', 'opengl'), () => {}); await fs.writeFileSync(infoDestPath, arrayBufferToBuffer(buffer)); return Swal.fire({ @@ -70,8 +70,8 @@ export const installShadersToGame = async (config: IRyujinxConfig, titleId: stri }; export const packShaders = async (config: IRyujinxConfig, titleID: string): Promise => { - const shaderZipPath = getRyujinxPath(config, 'games', titleID, 'cache', 'shader', 'guest', 'program', 'cache.zip'); - const shaderInfoPath = getRyujinxPath(config, 'games', titleID, 'cache', 'shader', 'guest', 'program', 'cache.info'); + const shaderZipPath = getRyujinxPath(config, 'games', titleID.toLowerCase(), 'cache', 'shader', 'guest', 'program', 'cache.zip'); + const shaderInfoPath = getRyujinxPath(config, 'games', titleID.toLowerCase(), 'cache', 'shader', 'guest', 'program', 'cache.info'); const archive = new zip(); archive.addLocalFile(shaderZipPath); archive.addLocalFile(shaderInfoPath);