summaryrefslogtreecommitdiff
path: root/gitdb/db/loose.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitdb/db/loose.py')
-rw-r--r--gitdb/db/loose.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/gitdb/db/loose.py b/gitdb/db/loose.py
index 192c524..53ade9f 100644
--- a/gitdb/db/loose.py
+++ b/gitdb/db/loose.py
@@ -225,16 +225,12 @@ class LooseObjectDB(FileDBBase, ObjectDBR, ObjectDBW):
if not isdir(obj_dir):
mkdir(obj_dir)
# END handle destination directory
- # rename onto existing doesn't work on windows
- if os.name == 'nt':
- if isfile(obj_path):
- remove(tmp_path)
- else:
- rename(tmp_path, obj_path)
- # end rename only if needed
+ # rename onto existing doesn't work on NTFS
+ if isfile(obj_path):
+ remove(tmp_path)
else:
rename(tmp_path, obj_path)
- # END handle win32
+ # end rename only if needed
# make sure its readable for all ! It started out as rw-- tmp file
# but needs to be rwrr