diff options
Diffstat (limited to 'gitdb')
| -rw-r--r-- | gitdb/db/loose.py | 13 | ||||
| m--------- | gitdb/ext/smmap | 0 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gitdb/db/loose.py b/gitdb/db/loose.py index 4732b56..1355e1c 100644 --- a/gitdb/db/loose.py +++ b/gitdb/db/loose.py @@ -226,10 +226,15 @@ class LooseObjectDB(FileDBBase, ObjectDBR, ObjectDBW): mkdir(obj_dir) # END handle destination directory # rename onto existing doesn't work on windows - if os.name == 'nt' and isfile(obj_path): - remove(obj_path) - # END handle win322 - rename(tmp_path, obj_path) + if os.name == 'nt': + if isfile(obj_path): + remove(tmp_path) + else: + rename(tmp_path, obj_path) + # end rename only if needed + else: + rename(tmp_path, obj_path) + # END handle win32 # make sure its readable for all ! It started out as rw-- tmp file # but needs to be rwrr diff --git a/gitdb/ext/smmap b/gitdb/ext/smmap -Subproject 84929ed811142e366d6c5916125302c1419acad +Subproject 18e4aea23644ea43657cb2e6846b6aaf78720c2 |
