Skip to content

Relative paths are constructed from a wrong basedir when importing markdown folder #14095

Closed
@kxxt

Description

@kxxt

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

With the following dir structure:

~/test 
❯ tree           
.
├── images
│   └── a.png
└── subdir
    └── a.md

3 directories, 2 files

~/test 
❯ cat subdir/a.md               
![img](../images/a.png)

When importing the test folder to Siyuan, the image is lost.

Siyuan tried to construct the abs path from ~/test and ../images/a.png, which leads to a non-existent path.

Instead it should construct the abs path from ~/test/subdir and ../images/a.png.

Expected result

The image should be there after the import.

Screenshot or screen recording presentation

No response

Version environment

- Version: Git master
- Operating System: Linux
- Browser (if used):

Log file

Not relevant

More information

No response

Activity

added a commit that references this issue on Feb 15, 2025
ff6811b
added this to the 3.1.23 milestone on Feb 15, 2025
added a commit that references this issue on Feb 15, 2025
530345b
added a commit that references this issue on Feb 28, 2025
9b937af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@kxxt

      Issue actions

        Relative paths are constructed from a wrong basedir when importing markdown folder · Issue #14095 · siyuan-note/siyuan