steipete/AFDownloadRequestOperation — pull request #12 by xinsight (2012-11-20 15:32:24+00:00)
Title: Avoid 'file exists' error if file has been previously downloaded

I ran into a problem that after a file downloaded, the renaming/moving from the cache to the final filename was failing with a with a "file exists" error if the file had previously been downloaded.

Now, the caller could remove the file before the download is started, but since AFDownloadRequestOperation knows the eventual filename (the caller just has a URL) and is responsible for the moving, I think it makes sense to remove the file before attempting the move and thus avoiding an error.