mirror of
https://git.yoctoproject.org/poky
synced 2026-03-17 20:59:42 +01:00
bitbake: utils: Specify dest file name in movefile()
When moving a file via the os.rename function, it was missing the destination file name which caused an OSError [YOCTO#8180] (Bitbake rev: b147ba0341d87e077bd2b09ef4355976ecd2d26b) Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
383450c78a
commit
f321655ad8
@@ -741,7 +741,9 @@ def movefile(src, dest, newmtime = None, sstat = None):
|
||||
renamefailed = 1
|
||||
if sstat[stat.ST_DEV] == dstat[stat.ST_DEV]:
|
||||
try:
|
||||
os.rename(src, dest)
|
||||
# os.rename needs to know the destination path with file name
|
||||
destfile = os.path.join(dest, os.path.basename(src))
|
||||
os.rename(src, destfile)
|
||||
renamefailed = 0
|
||||
except Exception as e:
|
||||
if e[0] != errno.EXDEV:
|
||||
|
||||
Reference in New Issue
Block a user