refactor: make human iar escape char a constant rather than a magic char
parent
668850b974
commit
9b2592a960
|
@ -43,6 +43,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
{
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue