Skip to content

fix(desktop): handle Windows verbatim path prefix to fix app startup crash#3134

Draft
Pallavikumarimdb wants to merge 1 commit into
different-ai:devfrom
Pallavikumarimdb:bugfix/windows-app-cant-start
Draft

fix(desktop): handle Windows verbatim path prefix to fix app startup crash#3134
Pallavikumarimdb wants to merge 1 commit into
different-ai:devfrom
Pallavikumarimdb:bugfix/windows-app-cant-start

Conversation

@Pallavikumarimdb

Copy link
Copy Markdown

Summary

Fixes an app startup crash on Windows.
The crash happens because Electron's app.getPath("userData") or app.getPath("appData") sometimes returns native Windows verbatim (extended-length) paths starting with \\?\ (e.g., \\?\C:\Users\username\AppData\Local\...).

Node.js standard path utilities (path.resolve, path.dirname, etc.) do not treat this prefix specially. When passed directly to path operations, the prefix was mangled into a path like \?, which subsequently failed with ENOENT during mkdir calls when creating directories like the Start Menu shortcut directory or the server configurations.

Changes

  1. Added stripWindowsVerbatimPrefix helper in main.mjs and workspace-store.mjs to strip \\?\, \\?\UNC\, and device prefixes from Windows paths before they are passed to path or filesystem operations.
  2. Fixed windowsProgramsPath(): Used process.env.USERPROFILE as the primary source of the user's home folder on Windows (which always returns a clean path) rather than splitting a potentially verbatim userData path string.
  3. Fixed normalizeLocalWorkspacePath(): Normalized and stripped verbatim prefixes before calling path.resolve so that stored workspace paths do not resolve to incorrect/mangled locations.

Why

Issue

Scope

Out of scope

Testing

Ran

  • ...

Result

  • pass/fail:
  • if fail, exact files/errors:

CI status

  • pass:
  • code-related failures:
  • external/env/auth blockers:

Manual verification

Evidence

  • video/screenshot link, or N/A (docs-only)

Risk

Rollback

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, Comment, Open in v0 Jul 25, 2026 5:58pm

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

@Pallavikumarimdb is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: App can not start - windows

1 participant