mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-02 23:31:42 -07:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
e9d2623237
1 changed files with 1 additions and 7 deletions
|
|
@ -338,13 +338,7 @@ class CuraPackageManager(QObject):
|
|||
with zipfile.ZipFile(filename) as archive:
|
||||
# Go through all the files and use the first successful read as the result
|
||||
for file_info in archive.infolist():
|
||||
is_dir = lambda file_info: file_info.filename.endswith('/')
|
||||
if is_dir or not file_info.filename.startswith("files/"):
|
||||
continue
|
||||
|
||||
filename_parts = os.path.basename(file_info.filename.lower()).split(".")
|
||||
stripped_filename = filename_parts[0]
|
||||
if stripped_filename in ("license", "licence"):
|
||||
if file_info.filename.endswith("LICENSE"):
|
||||
Logger.log("d", "Found potential license file '%s'", file_info.filename)
|
||||
try:
|
||||
with archive.open(file_info.filename, "r") as f:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue