修复普通文件附件

This commit is contained in:
Minho 2018-03-27 00:25:18 +08:00
parent dc214bc038
commit 95408e4b0d

View File

@ -615,9 +615,9 @@ func (book *Book) ImportBook(zipPath string) error {
filetil.CopyFile(linkPath, dstPath) filetil.CopyFile(linkPath, dstPath)
link = strings.TrimPrefix(strings.Replace(dstPath, "\\", "/", -1), strings.Replace(conf.WorkingDirectory, "\\", "/", -1)) tempLink := strings.TrimPrefix(strings.Replace(dstPath, "\\", "/", -1), strings.Replace(conf.WorkingDirectory, "\\", "/", -1))
link = strings.TrimSuffix(link, originalLink+")") + link + ")" link = strings.TrimSuffix(tempLink, originalLink+")") + link + ")"
} }
} }