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 for basic mod data checker #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jkbcdev
Copy link

@jkbcdev jkbcdev commented Aug 14, 2024

Fixes "unsupported archive for quick installer" error when trying to quick install an archive that has a single folder that gets moved by the data fixer. This is the same error and fix from this pull request, but for the basic mod data checker.

Fixes "unsupported archive for quick installer" error when trying to quick install an archive that has a single folder that gets moved by the data fixer.
@ZashIn
Copy link
Contributor

ZashIn commented Aug 16, 2024

The question is whether this should be

  1. "fixed" / worked around only in BasicModDataChecker
    ⇒ favor this PR over Fix Subnautica installer error #157 and remove the "fix" from all derived classes, like CyberpunkModDataChecker
  2. changed in the InstallerQuick (Simple Installer) itself here, since by definition .dataLooksValid() should only return FIXABLE if .fix() already implements a fix for that filetree, so traversing / unfolding the tree is redundant / unnecessary at that point.

Furthermore the current InstallerQuick approach checks the file tree multiple times if no VALID file tree is found, executing dataLooksValid() each time on:

  • root folder for VALID
  • then every solo sub folder for VALID
  • then once more the root for FIXABLE

That means this workaround redirects each of the above checks to .dataLooksValid(root).

So in my opinion, InstallerQuick should stop traversing the file tree as soon as VALID or FIXABLE is found and always rely on the required .fix() in the latter case. This also reduces the .dataLooksValid() calls by 1 to n(subfolders).

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.

2 participants