save replays in a less generic file extension

This commit is contained in:
Matthias Mailänder
2014-12-28 10:04:48 +01:00
parent 417b499472
commit 1b5928879c
4 changed files with 4 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ namespace OpenRA.FileFormats
public void RenameFile(string newFilenameWithoutExtension) public void RenameFile(string newFilenameWithoutExtension)
{ {
var newPath = Path.Combine(Path.GetDirectoryName(FilePath), newFilenameWithoutExtension) + ".rep"; var newPath = Path.Combine(Path.GetDirectoryName(FilePath), newFilenameWithoutExtension) + ".orarep";
File.Move(FilePath, newPath); File.Move(FilePath, newPath);
FilePath = newPath; FilePath = newPath;
} }

View File

@@ -57,7 +57,7 @@ namespace OpenRA.Network
var id = -1; var id = -1;
while (file == null) while (file == null)
{ {
var fullFilename = Path.Combine(dir, id < 0 ? "{0}.rep".F(filename) : "{0}-{1}.rep".F(filename, id)); var fullFilename = Path.Combine(dir, id < 0 ? "{0}.orarep".F(filename) : "{0}-{1}.orarep".F(filename, id));
id++; id++;
try try
{ {

View File

@@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
using (new Support.PerfTimer("Load replays")) using (new Support.PerfTimer("Load replays"))
{ {
replays = Directory replays = Directory
.GetFiles(dir, "*.rep") .GetFiles(dir, "*.orarep")
.Select(ReplayMetadata.Read) .Select(ReplayMetadata.Read)
.Where(r => r != null) .Where(r => r != null)
.OrderByDescending(r => r.GameInfo.StartTimeUtc) .OrderByDescending(r => r.GameInfo.StartTimeUtc)

View File

@@ -5,7 +5,7 @@
<icon name="openra" /> <icon name="openra" />
<generic-icon name="applications-games"/> <generic-icon name="applications-games"/>
<comment>OpenRA Replay</comment> <comment>OpenRA Replay</comment>
<glob weight="60" pattern="*.rep"/> <glob weight="60" pattern="*.orarep"/>
</mime-type> </mime-type>
</mime-info> </mime-info>