Skip to content

建议修改文件路径的生成方法 #1

@yushiro

Description

@yushiro

所有的文件路径, 都不要直接用string拼接, 这种方式会在linux下无法正常运行。

建议用Path.Combine(m_localPath, "Setting.txt")这种形式

还有你的m_localPath为啥要写的那么复杂, 我一般都是用下列方式直接取到exe文件的运行路径

m_localPath = AppDomain.CurrentDomain.BaseDirectory;
string tmpFolder = Path.Combine(m_localPath, "Temp");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions