mirror of
https://github.com/cloudreve/Cloudreve.git
synced 2025-12-26 00:12:50 +00:00
fix(thumb blob path): separators be wrongly modified
This commit is contained in:
parent
67c6f937c9
commit
ab0a6bf30c
|
|
@ -164,7 +164,11 @@ func ReplaceMagicVar(rawString string, fsSeparator string, pathAvailable bool, b
|
|||
return match
|
||||
case "{blob_path}":
|
||||
if blobAvailable {
|
||||
return filepath.Dir(completeBlobPath) + fsSeparator
|
||||
lastSlash := strings.LastIndexAny(completeBlobPath, "/\\")
|
||||
if lastSlash >= 0 {
|
||||
return completeBlobPath[:lastSlash] + fsSeparator
|
||||
}
|
||||
return fsSeparator
|
||||
}
|
||||
return match
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in New Issue