Skip to content

Commit dcf3453

Browse files
author
Ryan Roden-Corrent
committed
Remove redundant GlobalSettings.PathListSeparator.
Just use builtin Path.PathListSeparator.
1 parent 11b3e12 commit dcf3453

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

LibGit2Sharp/GlobalSettings.cs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -205,26 +205,14 @@ public static void DeregisterFilter(FilterRegistration registration)
205205
registration.Free();
206206
}
207207

208-
/// <summary>
209-
/// The separator used in path list strings (like in the PATH environment variable).
210-
/// A semi-colon ";" is used on Windows, and a colon ":" for all other systems.
211-
/// </summary>
212-
public static char PathListSeparator
213-
{
214-
get
215-
{
216-
return (Platform.OperatingSystem == OperatingSystemType.Windows) ? ';' : ':';
217-
}
218-
}
219-
220208
/// <summary>
221209
/// Get the paths under which libgit2 searches for the configuration file of a given level.
222210
/// </summary>
223211
/// <param name="level">The level (global/system/XDG) of the config.</param>
224212
/// <returns>The paths that are searched</returns>
225213
public static IEnumerable<string> GetConfigSearchPaths(ConfigurationLevel level)
226214
{
227-
return Proxy.git_libgit2_opts_get_search_path(level).Split(PathListSeparator);
215+
return Proxy.git_libgit2_opts_get_search_path(level).Split(Path.PathSeparator);
228216
}
229217

230218
/// <summary>
@@ -244,7 +232,7 @@ public static void SetConfigSearchPath(ConfigurationLevel level, string path)
244232
/// <param name="paths">The new search paths, or null to reset to default.</param>
245233
public static void SetConfigSearchPaths(ConfigurationLevel level, IEnumerable<string> paths)
246234
{
247-
var pathString = (paths == null) ? null : string.Join(PathListSeparator.ToString(), paths);
235+
var pathString = (paths == null) ? null : string.Join(Path.PathSeparator.ToString(), paths);
248236
Proxy.git_libgit2_opts_set_search_path(level, pathString);
249237
}
250238
}

0 commit comments

Comments
 (0)