mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-11-04 13:13:55 +01:00
fileName check in toFile method
This commit is contained in:
parent
d46e0af490
commit
56b4ff0435
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user