Skip to content

Commit 35819dc

Browse files
authored
Prevent File(path="") from becoming File(path=".") (#1109)
1 parent 5eed001 commit 35819dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datachain/lib/file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def validate_location(cls, v):
237237
@field_validator("path", mode="before")
238238
@classmethod
239239
def validate_path(cls, path):
240-
return Path(path).as_posix()
240+
return Path(path).as_posix() if path else ""
241241

242242
def model_dump_custom(self):
243243
res = self.model_dump()

0 commit comments

Comments
 (0)