diff options
-rw-r--r-- | lib/bb/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index 5b94432b..5eec7873 100644 --- a/lib/bb/utils.py +++ b/lib/bb/utils.py @@ -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: |