SvenWerlen / moulinette-core

FoundryVTT module which provides a set of tools for DMs for managing assets.
https://www.patreon.com/moulinette
MIT License
40 stars 10 forks source link

Audio length determination fails for S3 as it does not set the base path #72

Open FaeyUmbrea opened 11 months ago

FaeyUmbrea commented 11 months ago

The code for custom asset indexing does not consider the source URL and the base path for S3 buckets when determining the length of the audio files, causing that part of the indexing process to fail with a lot of errors.

When the code arrives at this line: https://github.com/SvenWerlen/moulinette-core/blob/main/modules/moulinette-file-util.js#L1243C4-L1243C4 after iterating over an S3 bucket, none of the elements will have their full URL set, so the match fails, and the path is then constructed form the pack base path, which is just the directory relative to webroot, and the file name.

This causes the constructed path to be applied to the base path of the foundry installation, resulting in error.

I did not check if the same occurs on other parts of the code.