| 203 | { |
| 204 | return FindLocalizedMissionHtmlFile(GetMissionDirectory(), "briefing"); |
| 205 | } |
| 206 | |
| 207 | void CreatePath(RString path) |
| 208 | { |
| 209 | const std::filesystem::path directory = FilesystemPathFromUtf8(path.Data()).parent_path(); |
| 210 | if (!directory.empty()) |
| 211 | CreateDirectoryUtf8(FilesystemPathToUtf8(directory).c_str()); |
| 212 | } |
| 213 | |
| 214 | static RString GetLegacyUserSaveDirectory() |
| 215 | { |
| 216 | return GetUserDirectory() + RString("Saved/") + GetBaseDirectory() + GetBaseSubdirectory() + |
| 217 | RString(Glob.header.filenameReal) + RString(".") + RString(Glob.header.worldname) + RString("/"); |
| 218 | } |
| 219 | |
| 220 | static void CopyLegacyUserSaveFiles(RString destination) |
| 221 | { |
| 222 | const RString source = GetLegacyUserSaveDirectory(); |
| 223 | static const char* filenames[] = {"autosave.fps", "continue.fps", "save.fps", "weapons.cfg"}; |
| 224 | for (const char* filename : filenames) |
no test coverage detected