Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypp committed Feb 10, 2019
1 parent 34310f0 commit e788286
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ bool _app_isupdaterequired (BROWSER_INFORMATION* pbi)
if (pbi->is_forcecheck)
return true;

if ((_r_unixtime_now () - app.ConfigGet (L"ChromiumLastCheck", 0).AsLonglong ()) >= _R_SECONDSCLOCK_DAY (pbi->check_period))
if (pbi->check_period && ((_r_unixtime_now () - app.ConfigGet (L"ChromiumLastCheck", 0).AsLonglong ()) >= _R_SECONDSCLOCK_DAY (pbi->check_period)))
return true;

return false;
Expand All @@ -424,9 +424,10 @@ bool _app_checkupdate (HWND hwnd, BROWSER_INFORMATION* pbi, bool *pis_error)
rstring::map_one result;

const bool is_exists = _r_fs_exists (pbi->binary_path);
bool result2 = false;
const bool is_checkupdate = _app_isupdaterequired (pbi);

bool result2 = false;

_app_setstatus (hwnd, app.LocaleString (IDS_STATUS_CHECK, nullptr), 0, 0);

if (!is_exists || is_checkupdate)
Expand Down

0 comments on commit e788286

Please sign in to comment.