Skip to content

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

Closed
ItsLJcool wants to merge 4 commits into
CodenameCrew:mainfrom
ItsLJcool:patch-1
Closed

Fixes minor mistake in calculating whitelisted and blacklisted items to be zipped.#682
ItsLJcool wants to merge 4 commits into
CodenameCrew:mainfrom
ItsLJcool:patch-1

Conversation

@ItsLJcool

Copy link
Copy Markdown
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

ItsLJcool commented Jul 10, 2025

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
Contributor Author

PR's ready to merge

@Raltyro Raltyro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i agree

@Raltyro

Raltyro commented Aug 9, 2025

Copy link
Copy Markdown
Member

I'm closing this for now

@Raltyro Raltyro closed this Aug 9, 2025
@ItsLJcool
ItsLJcool deleted the patch-1 branch February 8, 2026 07:16
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