Issue: mediaDB.json contains full paths on Windows instead of relative paths #765

Closed
opened 2026-10-05 03:04:24 +02:00 by adam · 0 comments
Owner

Describe the bug
When using mediaDB.json to store media file information, it currently saves files with the full absolute folder structure of my computer (Windows). This makes the project setup machine-specific and not easily portable. For example, the JSON may contain paths like:

{ 
  "USER": {
        "repos": {
            "PROJECT": {
                "assets": {
                    "FOLDER": {
                        "IMAGE.png": {
                            "title": "",
                            "caption": "TESTTESTTEST",
                            "alt": ""
                        }
                    }
                }
            }
        }
    }
}

To Reproduce
Steps to reproduce the behavior:

  1. Add a media asset to a project in Windows located in a nested folder structure.
  2. Observe the resulting mediaDB.json file and see that it contains your full local file path as part of the metadata hierarchy.

Expected behavior
The mediaDB.json file should use relative paths (relative to the project root or the assets folder) to ensure portability across different developer environments. This way, metadata can be shared via GitHub without others having to match the exact same folder structure on their computers.

Additional context
This is important for team collaboration and for sharing the project in different environments (across OSs, or different Windows user folders).

**Describe the bug** When using mediaDB.json to store media file information, it currently saves files with the full absolute folder structure of my computer (Windows). This makes the project setup machine-specific and not easily portable. For example, the JSON may contain paths like: ``` { "USER": { "repos": { "PROJECT": { "assets": { "FOLDER": { "IMAGE.png": { "title": "", "caption": "TESTTESTTEST", "alt": "" } } } } } } } ``` **To Reproduce** Steps to reproduce the behavior: 1. Add a media asset to a project in Windows located in a nested folder structure. 2. Observe the resulting mediaDB.json file and see that it contains your full local file path as part of the metadata hierarchy. **Expected behavior** The mediaDB.json file should use relative paths (relative to the project root or the assets folder) to ensure portability across different developer environments. This way, metadata can be shared via GitHub without others having to match the exact same folder structure on their computers. **Additional context** This is important for team collaboration and for sharing the project in different environments (across OSs, or different Windows user folders). <!-- github-sync-id:4034753984 -->
adam closed this issue 2026-10-05 03:04:24 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#765