diff options
author | Justin Clark-Casey (justincc) | 2012-10-24 03:08:58 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-24 03:08:58 +0100 |
commit | f76dceb90b5a76a7b6a5243c9032996c007c0cf5 (patch) | |
tree | 19b99bef42c0c56febfad10835027d3c6f101619 /OpenSim/Region/CoreModules/World/Objects | |
parent | Add "dump object uuid" console command. This allows any object in the scene ... (diff) | |
download | opensim-SC_OLD-f76dceb90b5a76a7b6a5243c9032996c007c0cf5.zip opensim-SC_OLD-f76dceb90b5a76a7b6a5243c9032996c007c0cf5.tar.gz opensim-SC_OLD-f76dceb90b5a76a7b6a5243c9032996c007c0cf5.tar.bz2 opensim-SC_OLD-f76dceb90b5a76a7b6a5243c9032996c007c0cf5.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Objects')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs index 41a1afd..f0a35ad 100644 --- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs | |||
@@ -485,11 +485,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands | |||
485 | 485 | ||
486 | string fileName = string.Format("{0}.xml", objectUuid); | 486 | string fileName = string.Format("{0}.xml", objectUuid); |
487 | 487 | ||
488 | if (File.Exists(fileName)) | 488 | if (!ConsoleUtil.CheckFileDoesNotExist(m_console, fileName)) |
489 | { | ||
490 | m_console.OutputFormat("File {0} already exists. Please move or remove it.", fileName); | ||
491 | return; | 489 | return; |
492 | } | ||
493 | 490 | ||
494 | using (XmlTextWriter xtw = new XmlTextWriter(fileName, Encoding.UTF8)) | 491 | using (XmlTextWriter xtw = new XmlTextWriter(fileName, Encoding.UTF8)) |
495 | { | 492 | { |