virtual_sdcard: Don't list files starting with a '.'

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-02-08 11:48:53 -05:00
parent 9766d62ad3
commit f1c804907c
1 changed files with 2 additions and 1 deletions

View File

@ -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")