summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-03-18 20:24:51 +1300
committerSimon Glass <sjg@chromium.org>2021-03-26 17:03:09 +1300
commit862ddf91002c31dcca7bd8f2712a98b71de01de8 (patch)
tree6f1b71d6a542645ca8c84fc31db7ec7e9c48ce9b
parent98ed0ae2cc12d4e7f5895673264f99de2e28317e (diff)
downloadu-boot-862ddf91002c31dcca7bd8f2712a98b71de01de8.tar.gz
u-boot-862ddf91002c31dcca7bd8f2712a98b71de01de8.tar.xz
u-boot-862ddf91002c31dcca7bd8f2712a98b71de01de8.zip
binman: Allow extracting to current directory
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@chromium.org>
-rw-r--r--tools/binman/control.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index 1952b2abf4..9c0cafeafc 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'" %