]> arthur.barton.de Git - bup.git/commit - lib/bup/index.py
lib/bup/index.py: mmap.mmap() objects need to be closed() for Win32.
authorLukasz Kosewski <lkosewsk@gmail.com>
Mon, 15 Mar 2010 03:17:42 +0000 (23:17 -0400)
committerLukasz Kosewski <lkosewsk@gmail.com>
Mon, 15 Mar 2010 20:15:44 +0000 (16:15 -0400)
commit8d6d1bb9f483f786127d11c4d5397c189fc977a8
tree20a8dace1b02ba98b62ee3a2ab66f5d238a46941
parent63637f7fff1879fd5f7d326065000c4a9ac12b1a
lib/bup/index.py:  mmap.mmap() objects need to be closed() for Win32.

Not *entirely* sure why this is the case, but it appears through some
refcounting weirdness, just setting the mmap variables to None in
index.Readers doesn't cause the mmap to be freed under Cygwin, though
I can't find any reason why this would be the case.

Naturally, this caused all sort of pain when we attempt to unlink
an mmaped file created while running bup index --check -u.

Fix the issue by explicitly .close()ing the mmap in Reader.close().
lib/bup/index.py