Skip to content

Commit

Permalink
fix: 文件夹有加号时自动转没了
Browse files Browse the repository at this point in the history
  • Loading branch information
li-guohao committed Jun 11, 2024
1 parent 861b564 commit d607886
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

更新日志文档,版本顺序从新到旧,最新版本在最前(上)面。

# 0.12.4

## 修复

- 文件夹有加号时自动转没了

# 0.12.3

## 优化
Expand Down
2 changes: 1 addition & 1 deletion console/src/views/AListControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const doPostImportPath = () => {
}
// basic64 编码
console.debug('original path value: ', path.value);
var base64Path = Base64.encode(path.value);
const base64Path = Base64.encode(path.value);
console.debug('basic64 path value: ', base64Path);
let config = {
headers: {'Content-Type': "application/json;charset=UTF-8"}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group=run.ikaros.plugin.alist
description=A ikaros plugin for alist.
version=0.12.3
version=0.12.4
5 changes: 4 additions & 1 deletion src/main/java/run/ikaros/plugin/alist/AListEndpoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ Mono<ServerResponse> doImportFilesFromAList(ServerRequest request) {
return request.bodyToMono(AListImportPostBody.class)
.filter(Objects::nonNull)
.map(AListImportPostBody::getPath)
.doOnSuccess(s -> log.debug("original path: {}", s))
.map(path -> new String(Base64.getDecoder().decode(path), StandardCharsets.UTF_8))
.doOnSuccess(s -> log.debug("base64 decoded path: {}", s))
.map(path -> path.replace("+", "%2B"))
.map(path -> URLDecoder.decode(path, StandardCharsets.UTF_8))
.doOnSuccess(s -> log.debug("path: {}", s))
.doOnSuccess(s -> log.debug("url decoded path: {}", s))
.filter(StringUtils::isNotBlank)
.flatMap(this::removeHttpPrefixIfExists)
.doOnSuccess(s -> log.debug("relative path: {}", s))
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: PluginAList
# plugin entry class that extends BasePlugin
clazz: run.ikaros.plugin.alist.AListPlugin
# plugin 'version' is a valid semantic version string (see semver.org).
version: 0.12.3
version: 0.12.4
requires: ">=0.12.1"
author:
name: Ikaros OSS Team
Expand Down

0 comments on commit d607886

Please sign in to comment.