Skip to content

Allow absolute paths for replays #667

@blole

Description

@blole

Setting save_replay = C:\some_path\a.rep in bwapi.ini doesn't work as expected, the replay ends up in <starcraft>\C\some_path\a.rep. This is because colons are filtered out from the path here:

// Remove illegal characters
boost::algorithm::erase_all_regex(pathStr, boost::regex("[[:cntrl:]?*<|>\":]"));

Do we want to still do this guarding against bad filenames? It's not the only possible error, you could get an access denied as well. If we want catch these errors and default to e.g. LastReplay.rep and write a message to std::cerr, I think we should do that here:

return CreateFileProc( getReplayName(fileName).c_str(), dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions