diff --git a/src/main/workers/ludusavi.worker.ts b/src/main/workers/ludusavi.worker.ts index 469ab721..855d20bf 100644 --- a/src/main/workers/ludusavi.worker.ts +++ b/src/main/workers/ludusavi.worker.ts @@ -35,7 +35,7 @@ export const backupGame = ({ preview?: boolean; winePrefix?: string; }) => { - const args = ["backup", title, "--api", "--force"]; + const args = ["backup", `"${title}"`, "--api", "--force"]; if (preview) args.push("--preview"); if (backupPath) args.push("--path", backupPath); diff --git a/src/renderer/src/pages/game-details/cloud-sync-modal/cloud-sync-modal.tsx b/src/renderer/src/pages/game-details/cloud-sync-modal/cloud-sync-modal.tsx index 7a546eb4..325b64e5 100644 --- a/src/renderer/src/pages/game-details/cloud-sync-modal/cloud-sync-modal.tsx +++ b/src/renderer/src/pages/game-details/cloud-sync-modal/cloud-sync-modal.tsx @@ -40,6 +40,7 @@ export function CloudSyncModal({ visible, onClose }: CloudSyncModalProps) { downloadGameArtifact, deleteGameArtifact, setShowCloudSyncFilesModal, + getGameBackupPreview, } = useContext(cloudSyncContext); const { objectId, shop, gameTitle, lastDownloadedOption } = @@ -81,6 +82,10 @@ export function CloudSyncModal({ visible, onClose }: CloudSyncModalProps) { downloadGameArtifact(artifactId); }; + useEffect(() => { + getGameBackupPreview(); + }, [getGameBackupPreview]); + const backupStateLabel = useMemo(() => { if (uploadingBackup) { return ( diff --git a/src/renderer/src/pages/game-details/game-details-content.tsx b/src/renderer/src/pages/game-details/game-details-content.tsx index b852916f..c80863c8 100644 --- a/src/renderer/src/pages/game-details/game-details-content.tsx +++ b/src/renderer/src/pages/game-details/game-details-content.tsx @@ -36,7 +36,7 @@ export function GameDetailsContent() { const { userDetails } = useUserDetails(); - const { setShowCloudSyncModal, getGameBackupPreview, getGameArtifacts } = + const { setShowCloudSyncModal, getGameArtifacts } = useContext(cloudSyncContext); const aboutTheGame = useMemo(() => { @@ -107,9 +107,8 @@ export function GameDetailsContent() { }; useEffect(() => { - getGameBackupPreview(); getGameArtifacts(); - }, [getGameBackupPreview, getGameArtifacts]); + }, [getGameArtifacts]); return (