diff --git a/graphify/export.py b/graphify/export.py index cd00f1bb..0e96bdb7 100644 --- a/graphify/export.py +++ b/graphify/export.py @@ -831,7 +831,7 @@ def to_canvas( canvas_nodes.append({ "id": f"n_{node_id}", "type": "file", - "file": f"graphify/obsidian/{fname}.md", + "file": f"{fname}.md", "x": nx_x, "y": nx_y, "width": 180, diff --git a/graphify/hooks.py b/graphify/hooks.py index 6e0155f1..3fa7d2e5 100644 --- a/graphify/hooks.py +++ b/graphify/hooks.py @@ -13,7 +13,10 @@ _PYTHON_DETECT = """\ # Detect the correct Python interpreter (handles pipx, venv, system installs) GRAPHIFY_BIN=$(command -v graphify 2>/dev/null) if [ -n "$GRAPHIFY_BIN" ]; then - _SHEBANG=$(head -1 "$GRAPHIFY_BIN" | sed 's/^#![[:space:]]*//') + case "$GRAPHIFY_BIN" in + *.exe) _SHEBANG="" ;; + *) _SHEBANG=$(head -1 "$GRAPHIFY_BIN" | sed 's/^#![[:space:]]*//') ;; + esac case "$_SHEBANG" in */env\\ *) GRAPHIFY_PYTHON="${_SHEBANG#*/env }" ;; *) GRAPHIFY_PYTHON="$_SHEBANG" ;;