Skip to content

Commit

Permalink
test mkdir
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxuanzhuang committed Dec 8, 2024
1 parent 025aac0 commit e550746
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions package/MDAnalysis/coordinates/XDR.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@

import errno
import numpy as np
import os
from pathlib import Path

from os.path import getctime, getsize, isfile, split, join
import warnings
from filelock import FileLock
Expand Down Expand Up @@ -197,6 +200,7 @@ def _load_offsets(self):

# check if the location of the lock is writable.
try:
Path(lock_name).parent.mkdir(parents=True, exist_ok=True)
with FileLock(lock_name) as filelock:
pass
except OSError as e:
Expand Down

0 comments on commit e550746

Please sign in to comment.