diff options
| author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-24 17:32:06 +0200 |
|---|---|---|
| committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-24 18:26:06 +0200 |
| commit | 534c9bbe320f638153f9ffd79b79fa124b544d0f (patch) | |
| tree | 731c56781e2b0bf367919ed8a0ef7e0a61f6a200 /gitdb/db/loose.py | |
| parent | 08b1f5f4fdc95d4ce24aa33ec82ac0d9723b8a02 (diff) | |
| download | gitdb-2.1.0.dev1.tar.gz | |
fix(win): FIX and HIDE 2 win-errors remainingv2.1.0.dev1
+ File-in-use errors were fixed with `gitdb.util.mman.collect()`!
+ This call is disabled `gitdb.util.HIDE_WINDOWS_KNOWN_ERRORS == False`.
+ Depend on latest smmp `v2.1.0.dev1` tag
Diffstat (limited to 'gitdb/db/loose.py')
| -rw-r--r-- | gitdb/db/loose.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gitdb/db/loose.py b/gitdb/db/loose.py index 374cdc7..1338e83 100644 --- a/gitdb/db/loose.py +++ b/gitdb/db/loose.py @@ -40,7 +40,8 @@ from gitdb.util import ( rename, dirname, basename, - join + join, + is_win, ) from gitdb.fun import ( @@ -71,7 +72,7 @@ class LooseObjectDB(FileDBBase, ObjectDBR, ObjectDBW): # On windows we need to keep it writable, otherwise it cannot be removed # either new_objects_mode = int("444", 8) - if os.name == 'nt': + if is_win: new_objects_mode = int("644", 8) def __init__(self, root_path): @@ -226,7 +227,7 @@ class LooseObjectDB(FileDBBase, ObjectDBR, ObjectDBW): mkdir(obj_dir) # END handle destination directory # rename onto existing doesn't work on windows - if os.name == 'nt': + if is_win: if isfile(obj_path): remove(tmp_path) else: |
