We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8c894f commit bc195fbCopy full SHA for bc195fb
gitdb/db/loose.py
@@ -36,7 +36,6 @@
36
chmod,
37
isfile,
38
remove,
39
- rename,
40
dirname,
41
basename,
42
join
@@ -53,6 +52,7 @@
53
52
54
import tempfile
55
import os
+import shutil
56
import sys
57
58
@@ -225,7 +225,9 @@ def store(self, istream):
225
if isfile(obj_path):
226
remove(tmp_path)
227
else:
228
- rename(tmp_path, obj_path)
+ shutil.copyfile(tmp_path, obj_path)
229
+ remove(tmp_path)
230
+ tmp_path = None
231
# end rename only if needed
232
233
# make sure its readable for all ! It started out as rw-- tmp file
0 commit comments