Closed smasoka closed 3 years ago
Yeah, I agree and code in download handles that well. The assumption that if the filename is there (under cache) than its complete should stand.
I am testing the partial part of the code and I get this, I'm just adding that and testing
I am testing the partial part of the code and I get this, I'm just adding that and testing
Nice catch.I suspect that there are going to be more of these subtleties.
@smasoka Lets have a think about this. The question raised in the comment is:
I suspect we may be able to by changing the code. The reasons being that:
.partial
extension. See here and here..partial
extension is renamed to the actual filename. See here for example.It might make more sense to do the hash check before the move. Then we know that if the file (without the .partial extension) exists, it has the right hash. One could also use an exception to indicate when this fails. e.g.