From 8009a33b26d6bd3bec632f7dfc6c7d3e3cce4dca Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 1 Mar 2016 12:35:08 +0000 Subject: [PATCH] Fix attempt to remove missing files. --- simgear/io/HTTPRepository.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);