Skip to content

Fixes minor mistake in calculating whitelisted and blacklisted items to be zipped. #682

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ItsLJcool
Copy link
Contributor

This code proves my code makes it work:

var zipList = [];
var whitelist = ["mods", "addons"];
for (folder in FileSystem.readDirectory("./")) {
    if (ZipUtil.bannedNames.contains(folder.toLowerCase()) || !whitelist.contains(folder.toLowerCase())) continue;
    // if (!whitelist.contains(folder.toLowerCase())) continue;
    zipList.push(folder);
}

image

ItsLJcool added 2 commits July 9, 2025 22:55
…ipped

It should not add `bannedNames` but allow only `whitelisted` names, even if the item is `whitelisted`, it should ban it from being zipped.
@ItsLJcool
Copy link
Contributor Author

ItsLJcool commented Jul 10, 2025

btw before the pr this made it impossible to choose what files you want to zip lmao

You are forced to zip everything

@ItsLJcool
Copy link
Contributor Author

Not sure if the new changes work so testing them in a moment

I made it so <c>whitelist<c> checked <r>every folder<r> instead of the <y>top layer<y> so it would filter out sub-folders when it should only care about <c>whitelist<c> or <l>blacklisting<l> when selecting the first folders. Fixed!
@ItsLJcool
Copy link
Contributor Author

PR's ready to merge

Copy link
Contributor

@Raltyro Raltyro left a comment

Choose a reason for hiding this comment

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

i agree

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