RMI-PACTA / pacta.portfolio.report

pacta.portfolio.report
https://rmi-pacta.github.io/pacta.portfolio.report/
MIT License
1 stars 0 forks source link

Exporting zip file fails for non-simple output paths #45

Closed AlexAxthelm closed 7 months ago

AlexAxthelm commented 7 months ago

https://github.com/RMI-PACTA/pacta.portfolio.report/blob/af09f9e8587b5d1a42aadb4ee61cabab5c5b57f5/R/create_interactive_report.R#L574-L581

When passing an arbitrary file path (in my case a nested directory, /output_dir/report/) as output_dir to create_interactive_report, export the zip archive fails.

zip I/O error: No such file or directory
zip error: Could not create output file (output_dir/report/report/DefaultPortfolio_interactive_report.zip)

I suspect this is because it's expecting to have a single directory with report underneath it, but I believe that this could be extended without too much difficulty to accept arbitrary filepaths.