mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-08-24 21:21:52 +02: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