[PATCH v3 01/27] binman: Allow extracting to current directory

Simon Glass sjg at chromium.org
Thu Mar 18 08:24:51 CET 2021


Extracting files to the current directory is not normally a very friendly
thing to do, but it can be warranted, e.g. in a new temporary dir. At
present binman reports an error when such an attempt is made. Fix it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 tools/binman/control.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/binman/control.py b/tools/binman/control.py
index 1952b2abf48..9c0cafeafc4 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -241,7 +241,7 @@ def ExtractEntries(image_fname, output_fname, outdir, entry_paths,
         # If this entry has children, create a directory for it and put its
         # data in a file called 'root' in that directory
         if entry.GetEntries():
-            if not os.path.exists(fname):
+            if fname and not os.path.exists(fname):
                 os.makedirs(fname)
             fname = os.path.join(fname, 'root')
         tout.Notice("Write entry '%s' size %x to '%s'" %
-- 
2.31.0.rc2.261.g7f71774620-goog



More information about the U-Boot mailing list