JMich: Get download link. If filename exists locally, check size. If size matches, mark as complete. If size doesn't match, assume incomplete download. If installer, check hashes, download missing and/or corrupt parts. If extra, continue download from end of file.
At no point was the downloader modifying files it didn't know about.
skeletonbow: It's not clear to me what files it does know about though. I'll assume from what you've said that if a filename changes, the old file will be left alone and not deleted and it's up to the user to clean up their directories as I've been attempting to do.
if i'm not wrong :
let's say you have a v1 installer of a game and you download the v2 one of the same game , the v1 installer is left in the directory.
if an installer has the same build version but different size (so different hash) ; i think the downloader restarts to zero to avoid issues we got in the past. If it's an incomplete file, it restarts where it could.
for bonus , if a file has just one different character, same story as the v1 & v2 installer.
the explanations of JMich are clear like the crystal :)