Description
Data about artifacts is counted once (including their size) and stored in the database (for multiple usage), but there is extra check to see if those files/directories still exist on disk. Condition for that right now is size()>0 and it seems like we have a bug here. We manually count the whole artifact size only to compare if it's bigger than zero. What we should do is return true after finding first not empty file to have the same behavior.
The attached jar file is a patch for Bamboo 5.0.1. Please replace the existing file from BambooInstall/atlassian-bamboo/WEB-INF/lib with the provided jar and see if that makes any difference (after restarting Bamboo). The proper fix would be in Bamboo version 5.2 and higher.