neo-debugger icon indicating copy to clipboard operation
neo-debugger copied to clipboard

Make it easier for Mac users to find debugger logs

Open djnicholson opened this issue 5 years ago • 1 comments

%LOCALAPPDATA% on Mac is ~/.local/share but a lot of people won't know that. Could mention in the settings UI where to typically find this location on various platforms.

djnicholson avatar Dec 04 '20 04:12 djnicholson

Code for Environment.SpecialFolder.LocalApplicationData on non windows machines (more info]

case SpecialFolder.LocalApplicationData:
    // "$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored."
    // "If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used."
    string? data = GetEnvironmentVariable("XDG_DATA_HOME");
    if (string.IsNullOrEmpty(data) || data[0] != '/')
    {
        data = Path.Combine(home, ".local", "share");
    }
    return data;

NOTE as per Environment.SpecialFolderOption, the default behavior of GetFolderPath returns an empty string if the folder does not exist. So should also modify the underlying code to specify SpecialFolderOption.Create

devhawk avatar Dec 05 '20 01:12 devhawk