Skip to content

[Bug]: obsidian-git tries to open exclude file in wrong location #961

@elgatov

Description

@elgatov

Describe the bug

When installing the Git plugin and setting a git folder, obsidian-git tries to open a file in C:\c\Users\elgato\Documents\Obsidian Vault\.git\info\, instead of the correct C:\c\Users\elgato\Documents\Obsidian Vault\.git\info\, which leads to the following error:

Relevant errors (if available) from notifications or console (CTRL+SHIFT+I)

Error while adding askpass script to exclude file: Error: ENOENT: no such file or directory, open 'C:\c\Users\elgato\Documents\Obsidian Vault\.git\info\exclude'
    at async open (node:internal/fs/promises:639:25)
    at async Object.readFile (node:internal/fs/promises:1246:14)
    at async Ce.addAskPassScriptToExclude (plugin:obsidian-git:134:3091)
    at async Ce.askpass (plugin:obsidian-git:134:2030)

Steps to reproduce

Install and enable obsidian-git

Expected Behavior

obsidian-git opens the file in the correct location

Addition context

No response

Operating system

Windows

Installation Method

None

Plugin version

2.35.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions