Get "save oar" and "save iar" to tell you in a more friendly manner if the filename to save already exists, rather than exception throwing.

Also changes ConsoleUtil.CheckFileExists to CheckFileDoesNotExist() since this is more meaningful in the context, even though it does result in double negatives.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-10-24 03:08:58 +01:00
parent 73db057fa1
commit f76dceb90b
6 changed files with 41 additions and 11 deletions

View File

@@ -141,6 +141,9 @@ namespace OpenSim.Server.Handlers.Asset
}
string fileName = rawAssetId;
if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, fileName))
return;
using (FileStream fs = new FileStream(fileName, FileMode.CreateNew))
{