Skip to content

Commit

Permalink
Merge pull request #60 from ydkhatri/master
Browse files Browse the repository at this point in the history
Fixes issue with illegal chars in paths within zip file
  • Loading branch information
ydkhatri authored Jul 28, 2020
2 parents 3c8b93f + 013acd5 commit c53ac3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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

0 comments on commit c53ac3f

Please sign in to comment.