mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🐛 File system exception when exporting docs containing ../ hyperlinks to Markdown Fix https://github.com/siyuan-note/siyuan/issues/9779
This commit is contained in:
parent
ee351057f1
commit
c9f90c606e
3 changed files with 22 additions and 6 deletions
|
|
@ -268,9 +268,12 @@ func IsDisplayableAsset(p string) bool {
|
|||
|
||||
func GetAbsPathInWorkspace(relPath string) (string, error) {
|
||||
absPath := filepath.Join(WorkspaceDir, relPath)
|
||||
if WorkspaceDir == absPath {
|
||||
return absPath, nil
|
||||
}
|
||||
|
||||
if IsSubPath(WorkspaceDir, absPath) {
|
||||
return absPath, nil
|
||||
} else {
|
||||
return "", os.ErrPermission
|
||||
}
|
||||
return "", os.ErrPermission
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue