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

Skript does not properly handle scripts in disabled folders. #6382

Open
1 task done
sovdeeth opened this issue Feb 1, 2024 · 1 comment
Open
1 task done

Skript does not properly handle scripts in disabled folders. #6382

sovdeeth opened this issue Feb 1, 2024 · 1 comment
Assignees
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@sovdeeth
Copy link
Member

sovdeeth commented Feb 1, 2024

Skript/Server Version

[17:15:21 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[17:15:21 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[17:15:21 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[17:15:21 INFO]: [Skript] Server Version: git-Paper-390 (MC: 1.20.4)
[17:15:21 INFO]: [Skript] Skript Version: 2.8.0 (selfbuilt-unknown)
[17:15:21 INFO]: [Skript] Installed Skript Addons:
[17:15:21 INFO]: [Skript]  - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[17:15:21 INFO]: [Skript] Installed dependencies: None

Bug Description

As discussed on discord, Skript struggles to identify scripts that are in disabled folders (starting with "-") as disabled unless the files themselves start with -. It also identifies folders that start with "-" as disabled files themselves.
There's also strange behavior when attempting to enable/disable files in a disabled folder. I have not tested enough to pin down the exact behavior.

Expected Behavior

Skript should enable/disable exactly what it is told to. If I /sk disable folder/, it should name the folder -folder and leave the files inside.
If I try to enable a file in a disabled folder, it should error.
If I disable a script within a folder, only that script should be disabled.

This will change behavior, but I think it's a more consistent end result.

In addition, the reporting of disabled scripts needs to be more exact. Scripts without "-" in disabled folders should still be reported, and the folders themselves should not be reported as scripts.

Steps to Reproduce

Create a folder "-directory" in /scripts/.
Create "test.sk" within it.
Create "-test2.sk" within it.

Run !send disabled scripts

You should see the following, notably lacking test.sk.

[17:23:24 INFO]: -directory
[17:23:24 INFO]: -directory\-test2.sk

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Feb 1, 2024
@APickledWalrus APickledWalrus self-assigned this Feb 1, 2024
@AyhamAl-Ali
Copy link
Member

I remember I had made this PR already but when I checked I saw my tries 3 years ago to fix it but idk why I never finished it 😬
Pickle feel free to take over the code if it helps you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

3 participants