Browse Source

Make fancy_rename python3-compatible.

Jelmer Vernooij 7 năm trước cách đây
mục cha
commit
04ba765ae3
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      dulwich/file.py

+ 1 - 1
dulwich/file.py

@@ -47,7 +47,7 @@ def _fancy_rename(oldname, newname):
 
 
     # destination file exists
     # destination file exists
     try:
     try:
-        (fd, tmpfile) = tempfile.mkstemp(".tmp", prefix=oldname+".", dir=".")
+        (fd, tmpfile) = tempfile.mkstemp(".tmp", prefix=oldname, dir=".")
         os.close(fd)
         os.close(fd)
         os.remove(tmpfile)
         os.remove(tmpfile)
     except OSError:
     except OSError: