Skip to content

Expand ~/ to home directory in config file paths #1933

Closed

Description

@waldekmastykarz

Description

Paths in config files support the ~appFolder and ~dataFolder tokens, but ~/ isn't expanded to the user's home directory. In shells, git (core.excludesFile, include.path) and tools like mitmproxy, ~/ means home. Setting a path like ~/mocks/mocks.json makes Dev Proxy treat ~ as a literal folder name relative to the config file.

Evidence

DevProxy.Abstractions/Utils/ProxyUtils.cs:189-198 (ReplacePathTokens) replaces only ~dataFolder and ~appFolder. GetFullPath then resolves the result relative to the config file.

Expected

Expand a leading ~/ (and ~\ on Windows) to the user's home directory in all path options, alongside the existing tokens.

Metadata

Metadata

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions