Skip to content

Commit 1458527

Browse files
committed
fix: 修复部分情况下获取下载链接失败的bug
1 parent a77fa2f commit 1458527

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/util/file_utils.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,12 @@ class FileUtils {
255255
if (encodedPath.endsWith("/")) {
256256
encodedPath = encodedPath.substring(0, encodedPath.length - 1);
257257
}
258+
encodedPath = "$encodeBasePath$encodedPath";
259+
if(!encodeBasePath.startsWith("/")){
260+
encodedPath = "/$encodedPath";
261+
}
258262

259-
String url = "${user.serverUrl}d$encodeBasePath$encodedPath";
263+
String url = "${user.serverUrl}d$encodedPath";
260264
if (sign != null && sign.isNotEmpty) {
261265
url = "$url?sign=$sign";
262266
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1616
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1717
# In Windows, build-name is used as the major, minor, and patch parts
1818
# of the product and file versions while build-number is used as the build suffix.
19-
version: 1.1.0+12
19+
version: 1.1.1+13
2020

2121
environment:
2222
sdk: '>=2.19.6 <3.0.0'

0 commit comments

Comments
 (0)