From be3a8fa3c7b74b7bb5648d4d33ce4379815ae007 Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Wed, 29 Jun 2011 22:26:36 +0200 Subject: [PATCH] Skip the Thumbs.db files that Windows likes to add. --- Sources/Plasma/Apps/plClient/external/create_resource_dat.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/Plasma/Apps/plClient/external/create_resource_dat.py b/Sources/Plasma/Apps/plClient/external/create_resource_dat.py index 50374346..a46a0c0d 100644 --- a/Sources/Plasma/Apps/plClient/external/create_resource_dat.py +++ b/Sources/Plasma/Apps/plClient/external/create_resource_dat.py @@ -18,6 +18,10 @@ def create_resource_dat(resfilepath, inrespath): ## Get list of files to archive resourceList = glob.glob(os.path.join(inrespath, "*")) resourceList.sort() + try: + resourceList.remove(os.path.join(inrespath, "Thumbs.db")) # likely to be there on Windows and likely to be unwanted + except ValueError: + pass if len(resourceList) == 0: print("No files found in '{0}'. Quitting.\n".format(inrespath)) return False