This commit is contained in:
Daniel 2024-12-24 16:33:24 +08:00
parent 78d5f54117
commit d34caba3bb
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 6 additions and 0 deletions

View file

@ -116,6 +116,9 @@ func NetAssets2LocalAssets(rootID string, onlyImg bool, originalURL string) (err
if strings.Contains(u, ":") {
u = strings.TrimPrefix(u, "/")
}
if strings.Contains(u, "?") {
u = u[:strings.Index(u, "?")]
}
if !gulu.File.IsExist(u) || gulu.File.IsDir(u) {
continue