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