Filelist should just include filenames, not absolute path to the file!
This commit is contained in:
@@ -66,7 +66,7 @@ def get_filelist(addon_path: Path) -> list:
|
|||||||
raise FileNotFoundError("Cannot extract blinfo from '%s'; no such file or directory" % addon_path)
|
raise FileNotFoundError("Cannot extract blinfo from '%s'; no such file or directory" % addon_path)
|
||||||
|
|
||||||
if addon_path.is_dir():
|
if addon_path.is_dir():
|
||||||
return [str(addon_path)]
|
return [addon_path.name]
|
||||||
|
|
||||||
if addon_path.is_file():
|
if addon_path.is_file():
|
||||||
ext = addon_path.suffix.lower()
|
ext = addon_path.suffix.lower()
|
||||||
@@ -74,7 +74,7 @@ def get_filelist(addon_path: Path) -> list:
|
|||||||
if ext == '.zip':
|
if ext == '.zip':
|
||||||
return filelist_from_zip(addon_path)
|
return filelist_from_zip(addon_path)
|
||||||
elif ext == '.py':
|
elif ext == '.py':
|
||||||
return [str(addon_path)]
|
return [addon_path.name]
|
||||||
else:
|
else:
|
||||||
raise BadAddon("File '%s' doesn't have a .zip or .py extension; not an addon" % addon_path)
|
raise BadAddon("File '%s' doesn't have a .zip or .py extension; not an addon" % addon_path)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user