From 0767fbcea4f4b73b2a5255d5c1e5007165a89091 Mon Sep 17 00:00:00 2001 From: Kuingsmile Date: Wed, 7 Feb 2024 05:46:25 -0800 Subject: [PATCH] :bug: Fix(custom): optimize github remote delete ISSUES CLOSED: #158 --- src/renderer/apis/github.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/apis/github.ts b/src/renderer/apis/github.ts index 9bd753b..638dac4 100644 --- a/src/renderer/apis/github.ts +++ b/src/renderer/apis/github.ts @@ -19,9 +19,10 @@ export default class GithubApi { } private static createKey (path: string | undefined, fileName: string): string { + const formatedFileName = fileName.replace(/%2F/g, '/') return path && path !== '/' - ? `${path.replace(/^\/+|\/+$/, '')}/${fileName}` - : fileName + ? `${path.replace(/^\/+|\/+$/, '')}/${formatedFileName}` + : formatedFileName } static async delete (configMap: IConfigMap): Promise {