aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-11-09 15:54:43 +0000
committerJustin Clark-Casey (justincc)2009-11-09 15:54:43 +0000
commit9b2592a9609edffb132138ce96537f5c7de1a024 (patch)
treefa5aac64adc57e71972337579c4c7588d1214f4e /OpenSim/Region/CoreModules
parent* for iars, allow item names/folders including "/" to be escaped using "\/" (diff)
downloadopensim-SC_OLD-9b2592a9609edffb132138ce96537f5c7de1a024.zip
opensim-SC_OLD-9b2592a9609edffb132138ce96537f5c7de1a024.tar.gz
opensim-SC_OLD-9b2592a9609edffb132138ce96537f5c7de1a024.tar.bz2
opensim-SC_OLD-9b2592a9609edffb132138ce96537f5c7de1a024.tar.xz
refactor: make human iar escape char a constant rather than a magic char
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
index e297c37..5c31c26 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
@@ -42,7 +42,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
42 public static class InventoryArchiveUtils 42 public static class InventoryArchiveUtils
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 // Character used for escaping the path delimter ("\/") and itself ("\\") in human escaped strings
47 public static readonly char ESCAPE_CHARACTER = '\\';
46 public static readonly string PATH_DELIMITER = "/"; 48 public static readonly string PATH_DELIMITER = "/";
47 49
48 /// <summary> 50 /// <summary>
@@ -236,7 +238,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
236 238
237 for (int i = 0; i < path.Length; i++) 239 for (int i = 0; i < path.Length; i++)
238 { 240 {
239 if (path[i] == '\\' && !singleEscapeChar) 241 if (path[i] == ESCAPE_CHARACTER && !singleEscapeChar)
240 { 242 {
241 singleEscapeChar = true; 243 singleEscapeChar = true;
242 } 244 }
@@ -267,7 +269,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
267 bool singleEscapeChar = false; 269 bool singleEscapeChar = false;
268 for (int i = 0; i < path.Length; i++) 270 for (int i = 0; i < path.Length; i++)
269 { 271 {
270 if (path[i] == '\\' && !singleEscapeChar) 272 if (path[i] == ESCAPE_CHARACTER && !singleEscapeChar)
271 singleEscapeChar = true; 273 singleEscapeChar = true;
272 else 274 else
273 singleEscapeChar = false; 275 singleEscapeChar = false;