Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ocaml/xcp-rrdd/scripts/rrdd/rrdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ def lazy_complete_init(self):
self.path = self.dispatcher.get_path({"uid": self.uid})
base_path = os.path.dirname(self.path)
if not os.path.exists(base_path): os.makedirs(base_path)
self.dest = open(self.path, "wb")
# Open file at pos 0, creating but not truncating the file(not possible otherwise):
fd = os.open(self.path, os.O_RDWR|os.O_CREAT)
self.dest = os.fdopen(fd, "r+b")

def __del__(self):
self.deregister()
Expand Down