mirror of
https://github.com/Neocky/pluGET.git
synced 2024-04-29 16:12:30 +00:00
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:
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user