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

Prompt to delete dirs containing empty registered dirs #3942

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Dec 11, 2023

Problem

  1. Install TweakScale with the current dev build (problem reported not to happen with the released version)
  2. Launch the game
  3. Start or load a save
  4. Launch a rocket
    This (or the previous step, not clear) should create a GameData/TweakScale/Plugins/PluginData/Scale/config.xml file
    image
    (Don't ask me why this isn't just GameData/TweakScale/PluginData/config.xml instead.)
  5. Close the game
  6. Uninstall TweakScale
  7. You're prompted to delete the PluginData folder, but not the Plugins or Tweakscale parent folders
    image
  8. As you'd expect, clicking Delete Checked leaves the TweakScale folder there

Cause

I think #3890's changes to the the deletion logic must have affected how subdirectories are treated, but I was more focused on understanding and fixing the current logic than on the details of the history.

Changes

Now when we check whether to ask the user about deleting a directory, we ignore any subdirectories that are already in that list. This will add the GameData/TweakScale and GameData/TweakScale/Plugins folders to the list, and clicking Delete Checked will result in a clean GameData:

image

  • I'll adjust the auto sizing of the help label before merging, just forgot to take care of that before pushing

Fixes #3936.

@HebaruSan HebaruSan added Bug Core (ckan.dll) Issues affecting the core part of CKAN labels Dec 11, 2023
Copy link
Member

@techman83 techman83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean and concise, awesome @HebaruSan !

@HebaruSan HebaruSan merged commit ca6c39c into KSP-CKAN:master Dec 11, 2023
8 checks passed
@HebaruSan HebaruSan deleted the fix/prompt-del-subdirs branch December 11, 2023 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Core (ckan.dll) Issues affecting the core part of CKAN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: current dev version leaves TweakScale folder behind when uninstalling
2 participants