Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Using a FileNameAdapter causes ByteLoadingOption.LIVELOAD to not work properly on add directory #77

Closed
1 task done
Katsute opened this issue Jul 20, 2020 · 1 comment
Assignees
Labels
bug Something isn't working as expected

Comments

@Katsute
Copy link
Member

Katsute commented Jul 20, 2020

Prerequisites

If all checks are not passed then the issue will be closed

  • I have checked that no other similar issue already exists

Operating System: Operating system name and version
Windows 10

Release Version: Release version or branch where the issue occurred
03.05.02

Issue

Explain your issue. Add any screenshots here
Using name adapter with liveload causes server to look for file at the adapted name instead of the unadapted name.

Expected Behavior

Explain what was supposed to happen
Server should look for file at non adapted name.

Steps To Reproduce

Explain how and/or when the error occurred
Use name adapter with liveload.

Suggested Fix

When using liveload get the folder that the file is in and for each of the children run the adapter to see which file would adapt to the requested name.

@Katsute Katsute added the bug Something isn't working as expected label Jul 20, 2020
@Katsute Katsute self-assigned this Jul 20, 2020
@Katsute
Copy link
Member Author

Katsute commented Jul 20, 2020

Cause of issue is that for live load server is using the relative (adapted name) for the file.

return pabs.equals(dabs) || (isWalkthrough && pabs.startsWith(dabs)) ? new File(dabs + relative) : null;

Instead server should construct a new file with the base folder name and adapt each file name in the folder until you get a match.

Test cases are missing for adapted names in add directory

Katsute added a commit that referenced this issue Jul 24, 2020
…ix@344e971

Fix #77 - Wrong file when using adapter name on directory files
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

1 participant