save replays in a less generic file extension
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user