]> git.mxchange.org Git - simgear.git/commitdiff
Fix attempt to remove missing files.
authorJames Turner <zakalawe@mac.com>
Tue, 1 Mar 2016 12:35:08 +0000 (12:35 +0000)
committerJames Turner <zakalawe@mac.com>
Tue, 1 Mar 2016 12:35:08 +0000 (12:35 +0000)
simgear/io/HTTPRepository.cxx

index 477232eacbe55bb6c7f12c0d1503722c9557105c..be2385d65881f6e638e617f7d62cf5c498825ea9 100644 (file)
@@ -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);