diff --git a/src/main.cpp b/src/main.cpp index d790a68..e8d3d9d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -666,7 +666,6 @@ bool _app_unpack_7zip (HWND hwnd, BROWSER_INFORMATION* pbi, LPCWSTR* pnames, siz rstring destPath; destPath.Format (L"%s\\%s", pbi->binary_dir, (LPWSTR)temp + root_dir_name.GetLength ()); - destPath.Replace (L"/", L"\\"); if (isDir) { @@ -699,7 +698,7 @@ bool _app_unpack_7zip (HWND hwnd, BROWSER_INFORMATION* pbi, LPCWSTR* pnames, siz } else { - res=OutFile_OpenW (&outFile, destPath); + res = OutFile_OpenW (&outFile, destPath); if (res != SZ_OK) { @@ -878,6 +877,9 @@ bool _app_unpack_zip (HWND hwnd, BROWSER_INFORMATION* pbi, LPCWSTR* pnames, size CloseHandle (hfile); SetFileAttributes (fpath, ze.attr); + + if (!result) + result = true; } else { @@ -886,12 +888,9 @@ bool _app_unpack_zip (HWND hwnd, BROWSER_INFORMATION* pbi, LPCWSTR* pnames, size } } - result = true; - CloseZip (hzip); } - return result; } @@ -1040,7 +1039,6 @@ UINT WINAPI _app_thread_check (LPVOID lparam) if (_app_installupdate (hwnd, pbi, &is_haveerror)) { app.ConfigSet (L"ChromiumLastCheck", _r_unixtime_now ()); - pbi->is_isinstalled = true; } } else diff --git a/src/main.hpp b/src/main.hpp index 7d9bac1..b41b7ee 100644 --- a/src/main.hpp +++ b/src/main.hpp @@ -43,9 +43,10 @@ struct BROWSER_INFORMATION WCHAR name_full[64] = {0}; WCHAR type[64] = {0}; - WCHAR cache_path[512] = {0}; - WCHAR binary_dir[512] = {0}; - WCHAR binary_path[512] = {0}; + WCHAR cache_path[MAX_PATH] = {0}; + WCHAR binary_dir[MAX_PATH] = {0}; + WCHAR binary_path[MAX_PATH] = {0}; + WCHAR download_url[512] = {0}; WCHAR urls[1024] = {0};