Skip to content

Commit fbbaf61

Browse files
authored
0.0.3
Fixed issue related to uploading to sub-folders
2 parents 24867cf + f649b3c commit fbbaf61

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

octoprint_prusaslicerthumbnails/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def __init__(self, fileBufferedReader, path, logger):
1717
self._collecting_data = False
1818
self._logger = logger
1919
self._path = path
20+
self._folder_path = os.path.dirname(path)
2021

2122
def process_line(self, origLine):
2223
if not len(origLine):
@@ -29,6 +30,8 @@ def process_line(self, origLine):
2930
if (len(line) != 0 and line.startswith("; thumbnail end")):
3031
self._collecting_data = False
3132
if len(self._thumbnail_data) > 0:
33+
if not os.path.exists(self._folder_path):
34+
os.makedirs(self._folder_path)
3235
if os.path.exists(self._path):
3336
os.remove(self._path)
3437
import base64

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
plugin_name = "PrusaSlicer Thumbnails"
1515

1616
# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
17-
plugin_version = "0.0.2"
17+
plugin_version = "0.0.3"
1818

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

0 commit comments

Comments
 (0)