◐ Shell
clean mode source ↗

Fix mkdir race condition in LooseObjectDB.store by EliahKagan · Pull Request #91 · gitpython-developers/gitdb

Expand Up @@ -8,7 +8,6 @@ ObjectDBW )

from gitdb.exc import ( BadObject, AmbiguousObjectName Expand All @@ -33,10 +32,8 @@ bin_to_hex, exists, chmod, isdir, isfile, remove, mkdir, rename, dirname, basename, Expand Down Expand Up @@ -222,8 +219,7 @@ def store(self, istream): if tmp_path: obj_path = self.db_path(self.object_path(hexsha)) obj_dir = dirname(obj_path) if not isdir(obj_dir): mkdir(obj_dir) os.makedirs(obj_dir, exist_ok=True) # END handle destination directory # rename onto existing doesn't work on NTFS if isfile(obj_path): Expand Down