-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
CKAN should not remove ship folders if empty on uninstall #1191
Comments
Just to be clear is it removing ships/VAB or ships/@thumbs/ and subdirectories? The former should be impossible - the code only calls directory.delete in one place and that has a guard for the directories. However it was never updated with 1.0.0 to include @thumbs and its subdirectories ... |
The addition is based on pjf comment "The CKAN should never be deleting these directories, and realistically we should probably be creating the system Ships subdirectories if they don't exist." which I took to mean if the directories are missing for whatever reason, just recreate them, even if they we're manually deleted. If I'm wrong I can close the RP. |
Just spent some time checking - I can get ckan to remove @thumbs/VAB, @thumbs/SPH and @thumbs but not VAB or SPH. If I am correct the "proper" fix is to add the three directories to the guard on line 773 of ModuleInstaller.cs Even with a fix it will still be worthwhile recreating them but doing so in uninstall seems a odd location. Having them missing will cause issues when installing modules, or while playing KSP, not while uninstalling. |
Right, I'll take another gander at it. Should I let the PR stay open or just close it and create another one once it's fixed? |
As far as I know either way would be fine - it isn't like there is discussion on the PR which would be lost if you made a new one. |
As reported by @SkyMarhsal in #1189, the CKAN will remove subdirectories
(VAB, SPH, etc) if a mod that includes craft files (eg: FAR) is uninstalled
and the directory is then empty.
The CKAN should never be deleting these directories, and realistically we
should probably be creating the system Ships subdirectories if they
don't exist.
Hopefully this is a simple patch to
ModuleInstaller
. :)The text was updated successfully, but these errors were encountered: