From dc2b63ba81daa3a615ce7682433244ef140af6d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 2 Feb 2021 15:57:16 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=85=20comm:=20treat=20sd=20file=20name?= =?UTF-8?q?s=20case=20sensitive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just in case some firmware variant decides to go for case sensitivity here (shouldn't usually happen since this should always be 8.3 names, but people tinker...) we treat the SD file names case sensitively again. Closes #3994 --- src/octoprint/util/comm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/octoprint/util/comm.py b/src/octoprint/util/comm.py index badc750d6..066d0b39a 100644 --- a/src/octoprint/util/comm.py +++ b/src/octoprint/util/comm.py @@ -2369,7 +2369,7 @@ class MachineCom(object): if not filename.startswith("/"): # file from the root of the sd -- we'll prepend a / filename = "/" + filename - self._sdFiles.append((filename.lower(), size)) + self._sdFiles.append((filename, size)) if longname is not None: self._sdFilesMap[filename] = longname continue @@ -5089,7 +5089,7 @@ class MachineCom(object): ): parts = cmd.split(None, 1) if len(parts) > 1: - filename = parts[1].strip().lower() + filename = parts[1].strip() if not filename.startswith("/"): filename = "/" + filename self._sdFileLongName = filename