Fixed TypeError while checking for updates & added update notes test

Changes:
- fixed TypeError when folder in plugin folder had .jar in name
- added update notes test to check all
This commit is contained in:
Neocky
2021-06-12 17:03:55 +02:00
parent 93818b90d7
commit 41527926b2
3 changed files with 30 additions and 11 deletions

View File

@@ -101,8 +101,7 @@ def ftp_validateFileAttributes(ftp, pluginPath):
pluginFTPAttribute = ftp.lstat(pluginPath)
if stat.S_ISDIR(pluginFTPAttribute.st_mode):
return False
if stat.S_ISDIR(pluginFTPAttribute.st_mode):
if re.search(r'.jar$', pluginFTPAttribute.filename):
return True
else:
return False
elif re.search(r'.jar$', pluginPath):
return True
else:
return False

View File

@@ -97,8 +97,7 @@ def sftp_validateFileAttributes(sftp, pluginPath):
pluginSFTPAttribute = sftp.lstat(pluginPath)
if stat.S_ISDIR(pluginSFTPAttribute.st_mode):
return False
if stat.S_ISDIR(pluginSFTPAttribute.st_mode):
if re.search(r'.jar$', pluginSFTPAttribute.filename):
return True
else:
return False
elif re.search(r'.jar$', pluginPath):
return True
else:
return False