Skip to content

Commit 146cccc

Browse files
author
Ryan Roden-Corrent
committed
Remove redundant GlobalSettings.PathListSeparator.
Just use builtin Path.PathListSeparator.
1 parent 27b6c8f commit 146cccc

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
@@ -274,26 +274,14 @@ internal static void DeregisterFilter(Filter filter)
274274
}
275275
}
276276

277-
/// <summary>
278-
/// The separator used in path list strings (like in the PATH environment variable).
279-
/// A semi-colon ";" is used on Windows, and a colon ":" for all other systems.
280-
/// </summary>
281-
public static char PathListSeparator
282-
{
283-
get
284-
{
285-
return (Platform.OperatingSystem == OperatingSystemType.Windows) ? ';' : ':';
286-
}
287-
}
288-
289277
/// <summary>
290278
/// Get the paths under which libgit2 searches for the configuration file of a given level.
291279
/// </summary>
292280
/// <param name="level">The level (global/system/XDG) of the config.</param>
293281
/// <returns>The paths that are searched</returns>
294282
public static IEnumerable<string> GetConfigSearchPaths(ConfigurationLevel level)
295283
{
296-
return Proxy.git_libgit2_opts_get_search_path(level).Split(PathListSeparator);
284+
return Proxy.git_libgit2_opts_get_search_path(level).Split(Path.PathSeparator);
297285
}
298286

299287
/// <summary>
@@ -313,7 +301,7 @@ public static void SetConfigSearchPath(ConfigurationLevel level, string path)
313301
/// <param name="paths">The new search paths, or null to reset to default.</param>
314302
public static void SetConfigSearchPaths(ConfigurationLevel level, IEnumerable<string> paths)
315303
{
316-
var pathString = (paths == null) ? null : string.Join(PathListSeparator.ToString(), paths);
304+
var pathString = (paths == null) ? null : string.Join(Path.PathSeparator.ToString(), paths);
317305
Proxy.git_libgit2_opts_set_search_path(level, pathString);
318306
}
319307
}

0 commit comments

Comments
 (0)