Files
fs2open.github.com/code/scripting/api/objs
Goober5000 5c737a5bf9 improve campaign file extension handling (#6443)
As discovered by WouterSmits, campaigns with periods in their filenames caused issues with FSO's campaign handling.  Specifically, in The Babylon Project, the EA-Minbari war v1.0.fc2 campaign would not save progress because FSO expected EA-Minbari war v1.fc2 in certain places.  This is because the `_splitpath()` function attempted to remove an extension from a filename that already had it removed.  For most campaigns this did not matter, but WouterSmits found a campaign where it did.

To solve this, there is now a new `util::get_file_part()` function to remove the path without removing the extension.  This replaces `_splitpath()` for campaign files, as well as the similar `clean_filename()` and `GetFilePart()` functions in other places.  All code paths were inspected for any chance of inadvertent extension adding, and Assertions were added to verify future code.  The only potential problem area was `player:loadCampaignSavefile()` which now pre-removes the campaign extension if needed.
2024-12-22 22:31:58 +01:00
..
2022-05-16 18:36:34 +09:00
2023-12-05 17:47:41 +01:00
2020-08-08 19:36:39 +02:00
2024-07-28 11:15:02 +02:00
2024-07-28 11:15:02 +02:00
2022-12-09 13:10:39 -05:00
2023-10-24 20:33:45 -04:00
2024-08-12 16:00:24 -04:00
2024-04-25 21:26:35 -04:00
2024-11-22 20:12:17 -05:00
2024-11-22 20:12:17 -05:00
2024-07-28 11:15:02 +02:00
2023-04-12 00:14:20 -04:00
2023-04-12 00:14:20 -04:00
2024-07-28 11:15:02 +02:00
2023-04-16 08:13:06 -04:00
2023-04-16 08:13:06 -04:00
2023-04-12 10:55:38 -04:00
2023-04-12 00:14:20 -04:00
2024-06-13 00:17:47 +02:00
2024-07-06 12:51:31 +02:00
2024-06-17 21:28:40 +02:00
2023-12-02 13:04:14 -05:00
2024-04-17 17:48:57 +00:00
2024-04-17 17:48:57 +00:00
2024-02-27 13:09:34 -05:00
2019-03-02 14:02:21 +01:00
2024-08-13 23:17:28 +02:00
2024-07-28 11:15:02 +02:00
2023-09-19 10:57:30 -05:00
2023-09-09 10:54:04 -05:00
2023-04-12 00:14:20 -04:00
2023-03-28 03:07:03 +09:00
2022-10-06 20:43:09 -04:00
2020-09-13 00:46:28 -04:00
2024-07-28 11:15:02 +02:00
2024-10-29 00:20:05 -04:00
2024-08-13 23:17:28 +02:00
2024-07-28 11:15:02 +02:00
2024-10-29 00:20:05 -04:00