From 745d5585e147cb1f360ec53dcc352042a54cd0e6 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Mon, 26 Apr 2021 15:57:47 -0700 Subject: [PATCH 1/2] Only try to remove symlink or delete the directory is the path exists(it will not exist when build for the first time) --- cmake/Tools/layout_tool.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/cmake/Tools/layout_tool.py b/cmake/Tools/layout_tool.py index f219ab0622..82d10f412f 100755 --- a/cmake/Tools/layout_tool.py +++ b/cmake/Tools/layout_tool.py @@ -312,14 +312,15 @@ def create_link(src:pathlib.Path, tgt:pathlib.Path, copy): tgt = pathlib.Path(tgt) if copy: # Remove the exist target - if tgt.is_symlink(): - tgt.unlink() - else: - def remove_readonly(func, path, _): - "Clear the readonly bit and reattempt the removal" - os.chmod(path, stat.S_IWRITE) - func(path) - shutil.rmtree(tgt, onerror=remove_readonly) + if tgt.exists(): + if tgt.is_symlink(): + tgt.unlink() + else: + def remove_readonly(func, path, _): + "Clear the readonly bit and reattempt the removal" + os.chmod(path, stat.S_IWRITE) + func(path) + shutil.rmtree(tgt, onerror=remove_readonly) logging.debug(f'Copying from {src} to {tgt}') shutil.copytree(str(src), str(tgt), symlinks=False) From f3ac3c3feab2215e3e5296507c4a189ea5baff5a Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Mon, 26 Apr 2021 15:59:45 -0700 Subject: [PATCH 2/2] Remove unused variable --- .../ImguiAtom/Code/Source/ImguiAtomSystemComponent.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.h b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.h index a5663216d5..d8e7409788 100644 --- a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.h +++ b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.h @@ -57,7 +57,6 @@ namespace AZ void OnRenderTick() override; void OnViewportSizeChanged(AzFramework::WindowSize size) override; - DebugConsole m_debugConsole; bool m_initialized = false; }; } // namespace LYIntegration