🐛 Virtual Printer: Lowercase only filename on SD (#4607)

Lowercasing entire path causes wrong dir to be used in some cases like
.octoprint/virtualsd instead of .octoprint/virtualSd.
This commit is contained in:
Arkadiusz Miśkiewicz authored and GitHub committed 2022-08-04 15:35:45 +02:00
1 parent b332a27247
commit f4110b40a3
1 file changed
+1 -1
@@ -1778,7 +1778,7 @@ class VirtualPrinter:
filename = filename
if filename.startswith("/"):
filename = filename[1:]
file = os.path.join(self._virtualSd, filename).lower()
file = os.path.join(self._virtualSd, filename.lower())
if os.path.exists(file):
if os.path.isfile(file):
os.remove(file)