#include "Exception.h"
-using namespace std;
-
extern ThreeBarProgressPage Progress;
// Return true if selected checks pass, false if they don't and the
check_for_cached (packagesource & pkgsource, HWND owner, bool mirror_mode,
bool check_hash)
{
+ /* If the packagesource doesn't have a filename, it can't possibly be in the
+ cache */
+ if (!pkgsource.Canonical())
+ {
+ return 0;
+ }
+
/* Note that the cache dir is represented by a mirror site of file://local_dir */
std::string prefix = "file://" + local_dir + "/";
- std::string fullname = prefix + (pkgsource.Canonical() ? pkgsource.Canonical() : "");
+ std::string fullname = prefix + pkgsource.Canonical();
if (mirror_mode)
{
total_download_bytes_sofar = 0;
download_failures.clear ();
- Progress.SetText1 ("Checking for packages to download...");
+ Progress.SetText1 (IDS_PROGRESS_CHECKING);
Progress.SetText2 ("");
Progress.SetText3 ("");
HANDLE *context;
context = (HANDLE *) p;
+ SetThreadUILanguage(langid);
+
try
{
int next_dialog =