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 prompt to delete SCANsat's settings at upgrade #3103

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

HebaruSan
Copy link
Member

Problem

  1. Install SCANsat v20.1
  2. Use it; it will create GameData/SCANsat/PluginData/Settings.cfg
  3. Upgrade to v20.2
  4. You'll be asked whether to remove the PluginData folder, even though the mod is still installed
    image

Cause

SCANsat creates PluginData as an empty folder and only uses it for saving its Settings.cfg, so it naturally meets the criteria for a removable config-only dir at uninstall. When we upgrade, we:

  1. Remove the older version, which flags PluginData as potentially removable
  2. Install the newer version, which creates the PluginData folder if it doesn't already exist but leaves it in the list of possibly removable dirs

Changes

Now when we install a directory, we remove it from the list of empty directories to ask the user about. This removes the prompt from the upgrade flow but still presents it at uninstall.

@HebaruSan HebaruSan added Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN Pull request labels Jul 8, 2020
@HebaruSan HebaruSan requested a review from DasSkelett July 8, 2020 16:11
@HebaruSan HebaruSan merged commit d8cacfe into KSP-CKAN:master Jul 8, 2020
@HebaruSan HebaruSan deleted the fix/rmdir-on-upgrade branch July 8, 2020 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants