Skip to content

Commit

Permalink
Still trying to solve the dot issue with the extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
npalacioescat committed Nov 15, 2024
1 parent 32e95e3 commit a7059c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cache_manager/_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def cache_fname(self) -> str:
Combination of `version_id` (key + version) and the file extension.
"""

ext = f'{self.ext}' if self.ext else ''
ext = f'.{self.ext}' if self.ext else ''

return f'{self.version_id}{ext}'

Expand Down Expand Up @@ -527,4 +527,5 @@ def _setup(self):
self.cache_fname
)
self.ext = self.ext or os.path.splitext(self.filename)[-1][1:] or None
self.ext = self.ext.strip('.') if self.ext is not None else None
self.date = self.date or _utils.parse_time()

0 comments on commit a7059c8

Please sign in to comment.