Skip to content

Commit

Permalink
Update faker/providers/file/__init__.py
Browse files Browse the repository at this point in the history
Co-authored-by: Flavio Curella <[email protected]>
  • Loading branch information
gotofritz and fcurella authored Dec 28, 2023
1 parent a3e973d commit 481f329
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion faker/providers/file/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def file_path(

file: str = self.file_name(category, extension)
if no_extension:
file = re.sub(r"\.[^/]+$", "", file)
file = file.rsplit(".", 1)[0]
path: str = f"/{file}"
for _ in range(0, depth):
path = f"/{self.generator.word()}{path}"
Expand Down

0 comments on commit 481f329

Please sign in to comment.