From 45b6cea0570715d2040b4e1fd3f771dc47f7c62d Mon Sep 17 00:00:00 2001 From: Rob Weber Date: Fri, 1 Aug 2014 14:32:29 -0500 Subject: [PATCH] best test we can do for zip file without looking in them --- resources/lib/backup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/backup.py b/resources/lib/backup.py index 404ade9..aaafadd 100644 --- a/resources/lib/backup.py +++ b/resources/lib/backup.py @@ -83,11 +83,11 @@ class XbmcBackup: for aFile in files: file_ext = aFile.split('.')[-1] - - if(file_ext == 'zip'): + folderName = aFile.split('.')[0] + + if(file_ext == 'zip' and (len(folderName) == 12 or len(folderName) == 8) and str.isdigit(folderName)): #folder may or may not contain time, older versions didn't include this - folderName = '' if(len(aFile ) > 8): folderName = aFile [6:8] + '-' + aFile [4:6] + '-' + aFile [0:4] + " " + aFile [8:10] + ":" + aFile [10:12] else: