Fixed Build add-on not parsing all the way through additional files

Snog

Well-known member
Affected version
2.0 Beta 3
If you build an add-on with this type of additional files to be included in build.json, anything beyond the "a" level is not being included in the built zip file.

Code:
"additional_files": ["data/groups/index.html",
    "data/groups/CategoryBanners/index.html",
    "data/groups/CategoryBanners/a/index.html",
    "data/groups/CategoryBanners/a/0/index.html",
    "data/groups/CategoryBanners/a/0/0-a56cac8089842afefa096c6e452b6891.png",
    .....

In this case anything in '.../a/0..' is not being included in the zip.

EDIT: More info..

The hashes for the files are showing up in hashes.json.
Code:
"data/groups/CategoryBanners/a/0/0-a56cac8089842afefa096c6e452b6891.png": "de608b7eb73705d4d15afd8fedac0cf015a6d59fb14bff104ce1c7a353ae9830",
"data/groups/CategoryBanners/a/0/index.html": "36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068",

From what I can tell, !info['filename'] in releasebuilder is preventing the 0 directory from being added to the zip.
 
Last edited:
You're correct in your assumption that it's the !$info['filename] check that's falling over. It's updated now.
 
On a side note though, you likely don't want to be including any out of the box content within data/ or internal_data/. It won't account for people moving them or using a different method of storage.
 
On a side note though, you likely don't want to be including any out of the box content within data/ or internal_data/. It won't account for people moving them or using a different method of storage.

Is there a variable that can be picked up for where the data/ path is?

And can that be assigned at install time? The values are required for default processing of some items.

Otherwise, that could be a problem on multiple levels.
 
Nothing should ever be written to or read from data or internal_data without using the abstracted file system (see the avatar system).

Hopefully you're using that stuff anyway. Of course by default the files will be in data and internal_data on the local file system but it may be possible to store them on an entirely different server or even using something like AWS S3.

So you distributing the files and having a user upload them to that directory on their server might not have the expected behaviour.

As a workaround, assuming these are "default" images for something, you might want to have the default images in a different directory and then copy them during install to the abstracted path. Otherwise you will be having to expect people to upload those manually if they aren't using a default setup.

I suspect you may have more questions. If that's the case, probably best to continue the discussion in the "Development discussions" forum.
 
Yes, I am using the abstracted file system for data files.

I'll switch things around to move the default files there on install as you suggest.
 
Back
Top Bottom