utils: Let makedirhier fail if existing path is not a folder
PATCH 1/1 utils: Let makedirhier fail if existing path is not a folder
In reply to a message not in the archiveFrom: Andre Rosa <[email protected]>
... instead of assuming a directory hierarchy is there or was created.
Signed-off-by Andre Rosa <[email protected]>
--- lib/bb/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/utils.py +1 -1
@@ -734,7 +734,7 @@ def mkdirhier(directory): try: os.makedirs(directory) except OSError as e: - if e.errno != errno.EEXIST: + if e.errno != errno.EEXIST or not os.path.isdir(directory): raise e def movefile(src, dest, newmtime = None, sstat = None):
--
2.20.1.519.g8feddda32c