1
0

lvm2-2.03.22-mkdir-lockfile.patch 449 B

123456789101112
  1. diff --git a/daemons/lvmdbusd/utils.py b/daemons/lvmdbusd/utils.py
  2. index 27b869c..206d495 100644
  3. --- a/daemons/lvmdbusd/utils.py
  4. +++ b/daemons/lvmdbusd/utils.py
  5. @@ -778,6 +778,7 @@ class LockFile(object):
  6. def __enter__(self):
  7. try:
  8. + os.makedirs(os.path.dirname(self.lock_file), exist_ok=True)
  9. self.fd = os.open(self.lock_file, os.O_CREAT | os.O_RDWR, stat.S_IRUSR | stat.S_IWUSR)
  10. # Get and set the close on exec and lock the file