Files
v2rayA/service/conf
Markson Pigeonzilla a76c965c36 fix(windows): prevent spurious etc\v2raya directory and boltv4.db on startup
On Windows, calling configurev4.IsConfigureNotExists() triggered the v4
library to lazy-initialize using its Linux-default config path (/etc/v2raya).
On Windows, /etc/v2raya resolves to \etc\v2raya on the current drive root
(e.g. C:\etc\v2raya).  The v4 library then called os.MkdirAll to create that
directory and bbolt.Open to create boltv4.db inside it -- neither of which
is intentional or useful on Windows.

v2rayA v4 was Linux-only, so no v4 configuration data can ever exist on a
Windows machine.  Guard the entire v4 migration check with a runtime.GOOS
check to skip it on Windows.

Also extend sanitizeConfigDirForPlatform to catch the relative-path variant
etc/v2raya (without a leading slash) in addition to the existing check for
the drive-relative /etc/v2raya, providing defence-in-depth if V2RAYA_CONFIG
is ever set to such a value.
2026-05-22 13:20:18 +08:00
..
2022-02-01 12:05:55 +08:00