Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue with illegal chars in paths within zip file #60

Merged
merged 2 commits into from
Jul 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions scripts/search_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ def search(self, filepattern):
for member in self.name_list:
if fnmatch.fnmatch(member, filepattern):
try:
self.zip_file.extract(member, path=self.temp_folder)
self.zip_file.extract(member, path=self.temp_folder) # already replaces illegal chars with _ when exporting
member = member.lstrip("/")
pathlist.append(os.path.join(self.temp_folder, Path(member)))
clean_name = sanitize_file_path(member) # replace illegal chars in path (if any)
full_path = os.path.join(self.temp_folder, Path(clean_name))
pathlist.append(full_path)
except Exception as ex:
logfunc(f'Could not write file to filesystem, path was {member}' + str(ex))
return pathlist
Expand Down
2 changes: 1 addition & 1 deletion scripts/version_info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
aleapp_version = '1.3'
aleapp_version = '1.3.1'

# Contributors List
# Format = [ Name, Blog-url, Twitter-handle, Github-url]
Expand Down