When moving a file via the os.rename function, it was missing the
destination file name which caused an OSError
[YOCTO#8180]
Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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: