[hyena] Paths: (GetExecPaths) do not hardcode unix path separator char, use a const
- From: AndrÃs Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena] Paths: (GetExecPaths) do not hardcode unix path separator char, use a const
- Date: Sun, 11 Nov 2012 19:20:18 +0000 (UTC)
commit 0e35a5acdf2cebd2133462e0e799e95dd96af0fe
Author: Andres G. Aragoneses <knocte gmail com>
Date: Sun Nov 11 19:20:13 2012 +0000
Paths: (GetExecPaths) do not hardcode unix path separator char, use a const
In a similar way we do it in Banshee.IO.Directory:
http://git.gnome.org/browse/banshee/tree/src/Core/Banshee.Core/Banshee.IO/Directory.cs#n38
Hyena/Hyena/Paths.cs | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/Hyena/Hyena/Paths.cs b/Hyena/Hyena/Paths.cs
index ba6e4f2..f87cc77 100644
--- a/Hyena/Hyena/Paths.cs
+++ b/Hyena/Hyena/Paths.cs
@@ -35,6 +35,9 @@ namespace Hyena
{
public class Paths
{
+ public const char UnixSeparator = ':';
+ public const char DosSeparator = ';';
+
public static string GetTempFileName (string dir)
{
return GetTempFileName (dir, null);
@@ -104,7 +107,7 @@ namespace Hyena
}
// this is super lame, should handle quoting/escaping
- return path.Split (':');
+ return path.Split (UnixSeparator);
}
public static string MakePathRelative (string path, string to)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]