refactor: make human iar escape char a constant rather than a magic char

0.6.8-post-fixes
Justin Clark-Casey (justincc) 2009-11-09 15:54:43 +00:00
parent 668850b974
commit 9b2592a960
1 changed files with 5 additions and 3 deletions

View File

@ -42,7 +42,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
public static class InventoryArchiveUtils
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// Character used for escaping the path delimter ("\/") and itself ("\\") in human escaped strings
public static readonly char ESCAPE_CHARACTER = '\\';
public static readonly string PATH_DELIMITER = "/";
/// <summary>
@ -236,7 +238,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
for (int i = 0; i < path.Length; i++)
{
if (path[i] == '\\' && !singleEscapeChar)
if (path[i] == ESCAPE_CHARACTER && !singleEscapeChar)
{
singleEscapeChar = true;
}
@ -267,7 +269,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
bool singleEscapeChar = false;
for (int i = 0; i < path.Length; i++)
{
if (path[i] == '\\' && !singleEscapeChar)
if (path[i] == ESCAPE_CHARACTER && !singleEscapeChar)
singleEscapeChar = true;
else
singleEscapeChar = false;