commit 7a9aa9e7532e53348c04f0325e4edeab13c0c96a
parent e9f705b3708b48b997ba0d8ea86e2890395fdbf5
Author: cfillion <cfillion@users.noreply.github.com>
Date: Tue, 8 Mar 2016 16:29:33 -0500
don't error out when failing to download a fresh index if a stale one exists
So that many features won't break if the computer doesn't have
access to internet.
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/reapack.cpp b/src/reapack.cpp
@@ -372,8 +372,11 @@ void ReaPack::loadIndex(const Remote &remote,
AUTO_STR("Write Failed"), MB_OK);
break;
case Download::Failure:
- MessageBox(parent, make_autostring(dl->contents()).c_str(),
- AUTO_STR("Download Failed"), MB_OK);
+ if(file_exists(Index::pathFor(remote.name()).join().c_str()))
+ load();
+ else
+ MessageBox(parent, make_autostring(dl->contents()).c_str(),
+ AUTO_STR("Download Failed"), MB_OK);
break;
default:
break;