Skip to content

Commit

Permalink
switch to any comparison instead of all for allowed suffixes to preve…
Browse files Browse the repository at this point in the history
…nt issues with file names that contain additional periods, ie part_v2.1.gcode.3mf
  • Loading branch information
jneilliii committed Nov 2, 2024
1 parent 3c8b904 commit 21e3003
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def get_file_by_stem(self, file_stem: str, allowed_suffixes: list[str]):
def _get_file_by_stem_cached(self, file_stem: str, allowed_suffixes: list[str]):
for file_path_str in list(self._file_data_cache.keys()) + list(self._file_alias_cache.keys()):
file_path = Path(file_path_str)
if file_stem == file_path.with_suffix("").stem and all(
if file_stem == file_path.with_suffix("").stem and any(
suffix in allowed_suffixes for suffix in file_path.suffixes
):
return self.get_file_data_cached(file_path)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "OctoPrint-BambuPrinter"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.1.8rc4"
plugin_version = "0.1.8rc5"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit 21e3003

Please sign in to comment.