From 11ff1b023dfe5b349534aa777c1acf011826b8c4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 2 Dec 2012 07:22:19 +0530 Subject: [PATCH] Portable installer: Better error message when installation fails. --- setup/installer/windows/portable-installer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup/installer/windows/portable-installer.cpp b/setup/installer/windows/portable-installer.cpp index 3c310a1caf..7eb8d10b63 100644 --- a/setup/installer/windows/portable-installer.cpp +++ b/setup/installer/windows/portable-installer.cpp @@ -418,8 +418,11 @@ static BOOL move_program() { } if (MoveFileEx(L"Calibre Portable\\Calibre", L"..\\Calibre", 0) == 0) { - show_last_error(L"Failed to move calibre program folder"); - return false; + Sleep(4000); // Sleep and try again + if (MoveFileEx(L"Calibre Portable\\Calibre", L"..\\Calibre", 0) == 0) { + show_last_error(L"Failed to move calibre program folder. This is usually caused by an antivirus program or a file sync program like DropBox. Turn them off temporarily and try again. Underlying error: "); + return false; + } } if (!directory_exists(L"..\\Calibre Library")) {