Skip to content

Commit

Permalink
Merge pull request #7 from devsapp/fix-windows
Browse files Browse the repository at this point in the history
fix windows \ as dir segment
  • Loading branch information
rsonghuster authored May 17, 2023
2 parents c5ef320 + 4be7f2b commit a40d1a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion publish.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Type: Application
Name: start-unzip-oss
Version: 0.0.14
Version: 0.0.15
Provider:
- 阿里云
Description: 使用函数计算自动解压上传到OSS指定前缀目录的zip文件
Expand Down
2 changes: 2 additions & 0 deletions src/code/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def get_zipfile_name(origin_name): # 解决中文乱码问题
name = name_bytes.decode(encoding="gb18030")
except:
name = name_bytes.decode(encoding="utf-8")
# fix windows \\ as dir segment
name = name.replace("\\", "/")
return name


Expand Down

0 comments on commit a40d1a1

Please sign in to comment.