From 6b70fa979427cd4f31fd42bbb35b29805f3830d9 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 30 Apr 2015 15:56:30 +0200 Subject: [PATCH] Do not list file starting with a . in upload handler --- gns3server/handlers/upload_handler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gns3server/handlers/upload_handler.py b/gns3server/handlers/upload_handler.py index 22d83b2c..9a431276 100644 --- a/gns3server/handlers/upload_handler.py +++ b/gns3server/handlers/upload_handler.py @@ -36,8 +36,9 @@ class UploadHandler: try: for root, _, files in os.walk(UploadHandler.image_directory()): for filename in files: - image_file = os.path.join(root, filename) - uploaded_files.append(image_file) + if not filename.startswith("."): + image_file = os.path.join(root, filename) + uploaded_files.append(image_file) except OSError: pass iourc_path = os.path.join(os.path.expanduser("~/"), ".iourc")