diff --git a/tools/lib/data.py b/tools/lib/data.py index d4ebe836..1edd0d1e 100644 --- a/tools/lib/data.py +++ b/tools/lib/data.py @@ -219,6 +219,8 @@ class dataFileBase(object): if suffix: fileNameComp.append(suffix) fileName="_".join(fileNameComp).replace(" ","_")+".dat" + if os.sep in fileName: + raise ValueError(f"fileName must be a pure file name not a path: {fileName}") file=subpath/fileName if not file.exists(): with file.open("w") as f: