From f76dceb90b5a76a7b6a5243c9032996c007c0cf5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 24 Oct 2012 03:08:58 +0100 Subject: 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. --- OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Asset') diff --git a/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs b/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs index 41ec14f..7639c6c 100644 --- a/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs @@ -127,6 +127,9 @@ namespace OpenSim.Region.OptionalModules.Asset } string fileName = rawAssetId; + + if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, fileName)) + return; using (FileStream fs = new FileStream(fileName, FileMode.CreateNew)) { -- cgit v1.1