# HG changeset patch # User Augie Fackler # Date 1606320508 18000 # Node ID 37bcd7f5a543ae3e8c7be759034e3bdfb0bd024b # Parent 777e8d88f703017557527a1c2d8f886cc0dfdafb pyoxidizer: make sure defaultrc directory exists before trying to write to it When doing some work involving one-file binaries, this line is failing for me. It seems reasonable to just make sure the destination directory exists before splatting the file into it. Differential Revision: https://phab.mercurial-scm.org/D9401 diff -r 777e8d88f703 -r 37bcd7f5a543 contrib/packaging/hgpackaging/pyoxidizer.py --- a/contrib/packaging/hgpackaging/pyoxidizer.py Sat Nov 21 13:30:50 2020 +0530 +++ b/contrib/packaging/hgpackaging/pyoxidizer.py Wed Nov 25 11:08:28 2020 -0500 @@ -127,6 +127,7 @@ # Write out a default editor.rc file to configure notepad as the # default editor. + os.makedirs(out_dir / "defaultrc", exist_ok=True) with (out_dir / "defaultrc" / "editor.rc").open( "w", encoding="utf-8" ) as fh: