Skip to content

Commit

Permalink
remove filelocked reference to self.path
Browse files Browse the repository at this point in the history
  • Loading branch information
ajslater committed Feb 9, 2022
1 parent 3791ef2 commit 9e91f5c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xapian_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ def wrapper(self, *args, **kwargs):
if self.path == MEMORY_DB_NAME or not self.use_lockfile:
func(self, *args, **kwargs)
else:
Path(self.path).mkdir(parents=True, exist_ok=True)
Path(self.filelock.lock_file).touch()
lockfile = Path(self.filelock.lock_file)
lockfile.parent.mkdir(parents=True, exist_ok=True)
lockfile.touch()
with self.filelock:
func(self, *args, **kwargs)

Expand Down

0 comments on commit 9e91f5c

Please sign in to comment.