From: James Turner Date: Tue, 1 Mar 2016 12:35:08 +0000 (+0000) Subject: Fix attempt to remove missing files. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8009a33b26d6bd3bec632f7dfc6c7d3e3cce4dca;p=simgear.git Fix attempt to remove missing files. --- diff --git a/simgear/io/HTTPRepository.cxx b/simgear/io/HTTPRepository.cxx index 477232ea..be2385d6 100644 --- a/simgear/io/HTTPRepository.cxx +++ b/simgear/io/HTTPRepository.cxx @@ -631,7 +631,10 @@ HTTPRepository::failure() const virtual void onFail() { file.reset(); - pathInRepo.remove(); + if (pathInRepo.exists()) { + pathInRepo.remove(); + } + if (_directory) { _directory->didFailToUpdateFile(fileName, AbstractRepository::REPO_ERROR_SOCKET); _directory->repository()->finishedRequest(this);