From f1c804907c4470160472f6407c58f0c9e47bcebb Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 8 Feb 2019 11:48:53 -0500 Subject: [PATCH] virtual_sdcard: Don't list files starting with a '.' Signed-off-by: Kevin O'Connor --- klippy/extras/virtual_sdcard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/klippy/extras/virtual_sdcard.py b/klippy/extras/virtual_sdcard.py index 84e80e9f..91bd31a9 100644 --- a/klippy/extras/virtual_sdcard.py +++ b/klippy/extras/virtual_sdcard.py @@ -48,7 +48,8 @@ class VirtualSD: try: filenames = os.listdir(self.sdcard_dirname) return [(fname, os.path.getsize(os.path.join(dname, fname))) - for fname in filenames] + for fname in filenames + if not fname.startswith('.')] except: logging.exception("virtual_sdcard get_file_list") raise self.gcode.error("Unable to get file list")