Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
europa-erp-python
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d9e5c8b9
authored
Sep 14, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add save path
parent
e34c3104
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
utils/file_handle.py
utils/file_handle.py
View file @
d9e5c8b9
...
...
@@ -14,9 +14,9 @@ def unzip(zip_path, save_path):
f
.
close
()
def
ungz
(
file_path
:
str
):
def
ungz
(
file_path
:
str
,
save_path
:
str
):
"""unzip the file like *.gz """
new_file_name
=
file_path
.
replace
(
".gz"
,
""
)
g_file
=
gzip
.
GzipFile
(
file_path
)
open
(
new_file_name
,
"wb+"
)
.
write
(
g_file
.
read
())
open
(
save_path
+
new_file_name
,
"wb+"
)
.
write
(
g_file
.
read
())
g_file
.
close
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment