From 16fa7f516a484e9f21fac34262214b3d9d761823 Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Mon, 16 Feb 2009 02:25:44 +0000 Subject: Converted to Linux newlines. --- .../AssetInventoryServer/Extensions/SimpleUtils.cs | 88 +++++++++++----------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'OpenSim/Grid/AssetInventoryServer/Extensions/SimpleUtils.cs') diff --git a/OpenSim/Grid/AssetInventoryServer/Extensions/SimpleUtils.cs b/OpenSim/Grid/AssetInventoryServer/Extensions/SimpleUtils.cs index fe6491e..b3edf59 100644 --- a/OpenSim/Grid/AssetInventoryServer/Extensions/SimpleUtils.cs +++ b/OpenSim/Grid/AssetInventoryServer/Extensions/SimpleUtils.cs @@ -1,44 +1,44 @@ -using System; -using System.IO; -using OpenMetaverse; - -namespace OpenSim.Grid.AssetInventoryServer.Extensions -{ - public static class SimpleUtils - { - public static string ParseNameFromFilename(string filename) - { - filename = Path.GetFileName(filename); - - int dot = filename.LastIndexOf('.'); - int firstDash = filename.IndexOf('-'); - - if (dot - 37 > 0 && firstDash > 0) - return filename.Substring(0, firstDash); - else - return String.Empty; - } - - public static UUID ParseUUIDFromFilename(string filename) - { - int dot = filename.LastIndexOf('.'); - - if (dot > 35) - { - // Grab the last 36 characters of the filename - string uuidString = filename.Substring(dot - 36, 36); - UUID uuid; - UUID.TryParse(uuidString, out uuid); - return uuid; - } - else - { - UUID uuid; - if (UUID.TryParse(Path.GetFileName(filename), out uuid)) - return uuid; - else - return UUID.Zero; - } - } - } -} +using System; +using System.IO; +using OpenMetaverse; + +namespace OpenSim.Grid.AssetInventoryServer.Extensions +{ + public static class SimpleUtils + { + public static string ParseNameFromFilename(string filename) + { + filename = Path.GetFileName(filename); + + int dot = filename.LastIndexOf('.'); + int firstDash = filename.IndexOf('-'); + + if (dot - 37 > 0 && firstDash > 0) + return filename.Substring(0, firstDash); + else + return String.Empty; + } + + public static UUID ParseUUIDFromFilename(string filename) + { + int dot = filename.LastIndexOf('.'); + + if (dot > 35) + { + // Grab the last 36 characters of the filename + string uuidString = filename.Substring(dot - 36, 36); + UUID uuid; + UUID.TryParse(uuidString, out uuid); + return uuid; + } + else + { + UUID uuid; + if (UUID.TryParse(Path.GetFileName(filename), out uuid)) + return uuid; + else + return UUID.Zero; + } + } + } +} -- cgit v1.1