XML <Include file=""> and <Script file=""> elements if supplied file names that don't exist in their current directory results in the client instead attempting to locate and load the named file from the top-level directory of an addon, rather than just erroring and complaining that the file doesn't exist.
This issue is possibly new since Dragonflight as it only occurs on the 10.x and Wrath (3.4.1) clients. It does not affect Classic Era (1.14.0). A test case addon is provided.
Check the messages printed to the chat frame. You should only see two lines for "Loaded: Directory\Script2.lua". You should not see "Loaded: Script1.lua" or "Loaded: Script2.lua".
On the Dragonflight (10.0.7) and Wrath (3.4.1) clients you'll see the following output - indicating that an <Script file="Script1.lua"/> element in Directory\File.xml resulted in the "Script1.lua" file from the parent directory being loaded.
On Classic Era (1.14.3) the behaviour is different - the "Script1.lua" file won't be loaded as it doesn't exist.
XML
<Include file="">
and<Script file="">
elements if supplied file names that don't exist in their current directory results in the client instead attempting to locate and load the named file from the top-level directory of an addon, rather than just erroring and complaining that the file doesn't exist.This issue is possibly new since Dragonflight as it only occurs on the 10.x and Wrath (3.4.1) clients. It does not affect Classic Era (1.14.0). A test case addon is provided.
Test case
On the Dragonflight (10.0.7) and Wrath (3.4.1) clients you'll see the following output - indicating that an
<Script file="Script1.lua"/>
element inDirectory\File.xml
resulted in the "Script1.lua" file from the parent directory being loaded.On Classic Era (1.14.3) the behaviour is different - the "Script1.lua" file won't be loaded as it doesn't exist.