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

Don't save settings outside game folder #10

Merged
merged 1 commit into from Sep 28, 2022

Conversation

HebaruSan
Copy link
Contributor

@HebaruSan HebaruSan commented Sep 26, 2022

Hi @linuxgurugamer,

A user spotted an "orphaned GameData" folder containing some of this mod's settings after running the game:

image

This happens because PatchInfo.destPath and PatchManager.CFG_DIR are relative paths, and a few of the places that use them do not prepend the game path (though some other spots do).

reproduced

Now all places that use these variables prepend the game path, so these files and folders should save to the right folder.

@linuxgurugamer
Copy link
Owner

linuxgurugamer commented Sep 26, 2022

Look at where destPath is used, (line 86) it adds the KSPUtil.ApplicationRootPath there

@HebaruSan
Copy link
Contributor Author

That's what I was referring to by "though some other spots do". I'm fixing code that does NOT use activePatchPath and therefore does NOT add KSPUtil.ApplicationRootPath.

@linuxgurugamer
Copy link
Owner

I'll review again when Im back on Wed

@HebaruSan
Copy link
Contributor Author

Yeah, the code that I'm fixing has no connection to the code at line 86. Both start from destPath, which is a relative path, and manipulate it separately.

@linuxgurugamer linuxgurugamer merged commit 47b8625 into linuxgurugamer:master Sep 28, 2022
@HebaruSan HebaruSan deleted the fix/relative-paths branch September 28, 2022 13:13
@linuxgurugamer
Copy link
Owner

@HebaruSan thanks. I did a fast look yesterday, missed the two you found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants