Skip to content

Commit 9ccc772

Browse files
authored
Fix regression (#18)
1 parent d01e5bf commit 9ccc772

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/data_designer/config/datastore.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ def _fetch_seed_dataset_column_names_from_local_file(dataset_path: str | Path) -
137137

138138
def _validate_dataset_path(dataset_path: Union[str, Path], allow_glob_pattern: bool = False) -> Path:
139139
if allow_glob_pattern and "*" in str(dataset_path):
140-
validate_path_contains_files_of_type(dataset_path, str(dataset_path).split(".")[-1])
140+
parts = str(dataset_path).split("*.")
141+
file_path = parts[0]
142+
file_extension = parts[-1]
143+
validate_path_contains_files_of_type(file_path, file_extension)
141144
return Path(dataset_path)
142145
if not Path(dataset_path).is_file():
143146
raise InvalidFilePathError("🛑 To upload a dataset to the datastore, you must provide a valid file path.")

0 commit comments

Comments
 (0)