mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
✨ Support for searching asset content https://github.com/siyuan-note/siyuan/issues/8874
This commit is contained in:
parent
0c0c6834c6
commit
a169b3913a
2 changed files with 10 additions and 2 deletions
|
|
@ -444,9 +444,12 @@ func copyTempAsset(absPath string) (ret string) {
|
|||
return
|
||||
}
|
||||
|
||||
filelock.RWLock.Lock()
|
||||
defer filelock.RWLock.Unlock()
|
||||
|
||||
ret = filepath.Join(dir, gulu.Rand.String(7)+".docx")
|
||||
if err := filelock.Copy(absPath, ret); nil != err {
|
||||
logging.LogErrorf("copy [%s] to [%s] failed: [%s]", absPath, ret, err)
|
||||
if err := gulu.File.Copy(absPath, ret); nil != err {
|
||||
logging.LogErrorf("copy [src=%s, dest=%s] failed: %s", absPath, ret, err)
|
||||
return
|
||||
}
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue