check if glob() returns any results, fix for stable45 was already approved by pull request #1695