Skip to content

Commit c53ac3f

Browse files
authored
Merge pull request abrignoni#60 from ydkhatri/master
Fixes issue with illegal chars in paths within zip file
2 parents 3c8b93f + 013acd5 commit c53ac3f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

scripts/search_files.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@ def search(self, filepattern):
7878
for member in self.name_list:
7979
if fnmatch.fnmatch(member, filepattern):
8080
try:
81-
self.zip_file.extract(member, path=self.temp_folder)
81+
self.zip_file.extract(member, path=self.temp_folder) # already replaces illegal chars with _ when exporting
8282
member = member.lstrip("/")
83-
pathlist.append(os.path.join(self.temp_folder, Path(member)))
83+
clean_name = sanitize_file_path(member) # replace illegal chars in path (if any)
84+
full_path = os.path.join(self.temp_folder, Path(clean_name))
85+
pathlist.append(full_path)
8486
except Exception as ex:
8587
logfunc(f'Could not write file to filesystem, path was {member}' + str(ex))
8688
return pathlist

scripts/version_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
aleapp_version = '1.3'
1+
aleapp_version = '1.3.1'
22

33
# Contributors List
44
# Format = [ Name, Blog-url, Twitter-handle, Github-url]

0 commit comments

Comments
 (0)