Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cachePath sittuation in gog.js #51

Open
ErykDarnowski opened this issue Apr 22, 2023 · 0 comments
Open

Fix cachePath sittuation in gog.js #51

ErykDarnowski opened this issue Apr 22, 2023 · 0 comments
Assignees
Labels
🐛 bug Something isn't working
Milestone

Comments

@ErykDarnowski
Copy link
Owner

Description

if (fs.existsSync(cachePath)) {
var cacheJSON = JSON.parse(fs.readFileSync('cache.json'));
// check if URL value changed:
if (gogURL != cacheJSON[0].url) {
appId = await getGOGAppId(gogURL);
var output = `[
{
"store_name": "GOG",
"url": "${gogURL}",
"data": "${appId}"
}
]`;
fs.writeFileSync('cache.json', JSON.stringify(JSON.parse(output)));

@ErykDarnowski ErykDarnowski added the 🐛 bug Something isn't working label Apr 22, 2023
@ErykDarnowski ErykDarnowski added this to the 1.0.0 milestone Apr 22, 2023
@ErykDarnowski ErykDarnowski self-assigned this Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant