From 9c5284e7b580a757ad7ecc3ef814a269d5f58eb9 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 22 Jul 2019 08:57:21 +0200 Subject: [PATCH] tools: installer: verify that IDF_PATH doesn't contain spaces --- tools/windows/tool_setup/idf_download_page.iss.inc | 9 ++++++++- tools/windows/tool_setup/idf_page.iss.inc | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/windows/tool_setup/idf_download_page.iss.inc b/tools/windows/tool_setup/idf_download_page.iss.inc index 3636123e7e..6f501c059f 100644 --- a/tools/windows/tool_setup/idf_download_page.iss.inc +++ b/tools/windows/tool_setup/idf_download_page.iss.inc @@ -102,6 +102,7 @@ var Page: TInputOptionWizardPage; IDFPath: String; begin + Result := False; Page := TInputOptionWizardPage(Sender); Log('OnIDFDownloadPageValidate index=' + IntToStr(Page.SelectedValueIndex)); @@ -110,7 +111,13 @@ begin begin MsgBox('Directory already exists and is not empty:' + #13#10 + IDFPath + #13#10 + 'Please choose a different directory.', mbError, MB_OK); - Result := False; + exit; + end; + + if Pos(' ', IDFPath) <> 0 then + begin + MsgBox('ESP-IDF build system does not support spaces in paths.' + #13#10 + 'Please choose a different directory.', mbError, MB_OK); exit; end; diff --git a/tools/windows/tool_setup/idf_page.iss.inc b/tools/windows/tool_setup/idf_page.iss.inc index 87cc5c5d07..e6baef9c8f 100644 --- a/tools/windows/tool_setup/idf_page.iss.inc +++ b/tools/windows/tool_setup/idf_page.iss.inc @@ -75,6 +75,13 @@ begin exit; end; + if Pos(' ', IDFPath) <> 0 then + begin + MsgBox('ESP-IDF build system does not support spaces in paths.' + #13#10 + 'Please choose a different directory.', mbError, MB_OK); + exit; + end; + IDFPyPath := IDFPath + '\tools\idf.py'; if not FileExists(IDFPyPath) then begin