create cache directory, if not exists
This commit is contained in:
parent
fb05b44b71
commit
46f68e2e92
1 changed files with 2 additions and 0 deletions
|
@ -94,6 +94,8 @@ class S3Source(FileBasedSource):
|
|||
if obj.object_name is not None and self.has_correct_extension(obj.object_name)
|
||||
]
|
||||
if self.index_file is not None and not os.path.isfile(self.index_file):
|
||||
os.makedirs(os.path.dirname(self.index_file), exist_ok=True)
|
||||
|
||||
with open(self.index_file, "w", encoding="utf8") as index_file_handle:
|
||||
dump(file_list, index_file_handle)
|
||||
return file_list
|
||||
|
|
Loading…
Add table
Reference in a new issue