From 4be7f2b200b1098b6f157600b2c208b3e93af46a Mon Sep 17 00:00:00 2001 From: rsonghuster Date: Wed, 17 May 2023 11:57:42 +0800 Subject: [PATCH] fix windows \ as dir segment --- publish.yaml | 2 +- src/code/index.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/publish.yaml b/publish.yaml index 92d3f3c..2db6bae 100644 --- a/publish.yaml +++ b/publish.yaml @@ -1,6 +1,6 @@ Type: Application Name: start-unzip-oss -Version: 0.0.14 +Version: 0.0.15 Provider: - 阿里云 Description: 使用函数计算自动解压上传到OSS指定前缀目录的zip文件 diff --git a/src/code/index.py b/src/code/index.py index ee8094f..0eba960 100644 --- a/src/code/index.py +++ b/src/code/index.py @@ -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