`ls -1 "$iconsdir/"*` listed the source directory for me when the glob had no matches. Switching to `-A` circumvents this problem and has the added advantage that it cannot run into argument list length limits.