Only reset the upload path if there is no `files` directory (see #5560)