Check whether the upload directory is empty during the version 3 update (see #6061)