Skip to content

Commit 6c36fa9

Browse files
committed
Correct debug asserts on whether a map file path ends with the extension
1 parent 80d08c6 commit 6c36fa9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

DXMainClient/Domain/Multiplayer/Map.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public Map(string baseFilePath)
5050

5151
public Map(string baseFilePath, bool isCustomMap)
5252
{
53-
Debug.Assert(!baseFilePath.EndsWith(ClientConfiguration.Instance.MapFileExtension, StringComparison.InvariantCultureIgnoreCase), $"Unexpected map path {baseFilePath}. It should not end with the map extension.");
53+
Debug.Assert(!baseFilePath.EndsWith($".{ClientConfiguration.Instance.MapFileExtension}", StringComparison.InvariantCultureIgnoreCase), $"Unexpected map path {baseFilePath}. It should not end with the map extension.");
5454

5555
BaseFilePath = baseFilePath;
5656
customMapFilePath = isCustomMap

DXMainClient/Domain/Multiplayer/MapLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ private ConcurrentDictionary<string, Map> LoadCustomMapCache()
255255
/// <returns>The map if loading it was successful, otherwise false.</returns>
256256
public Map LoadCustomMap(string mapPath, out string resultMessage)
257257
{
258-
Debug.Assert(!mapPath.EndsWith(ClientConfiguration.Instance.MapFileExtension, StringComparison.InvariantCultureIgnoreCase), $"Unexpected map path {mapPath}. It should not end with the map extension.");
258+
Debug.Assert(!mapPath.EndsWith($".{ClientConfiguration.Instance.MapFileExtension}", StringComparison.InvariantCultureIgnoreCase), $"Unexpected map path {mapPath}. It should not end with the map extension.");
259259

260260
string customMapFilePath = SafePath.CombineFilePath(ProgramConstants.GamePath, FormattableString.Invariant($"{mapPath}{ClientConfiguration.Instance.MapFileExtension}"));
261261
FileInfo customMapFile = SafePath.GetFile(customMapFilePath);

0 commit comments

Comments
 (0)