AbsolutePath ctor reuse

This commit is contained in:
Justin Swanson 2020-04-01 15:35:13 -05:00 committed by Timothy Baldridge
parent f66c59151b
commit 68ea31e5a0

View File

@ -52,14 +52,7 @@ namespace Wabbajack.Common
private readonly string _path;
public AbsolutePath(string path)
{
_path = path.ToLowerInvariant().Replace("/", "\\").TrimEnd('\\');
Extension = new Extension(Path.GetExtension(_path));
ValidateAbsolutePath();
}
public AbsolutePath(string path, bool skipValidation)
public AbsolutePath(string path, bool skipValidation = false)
{
_path = path.ToLowerInvariant().Replace("/", "\\").TrimEnd('\\');
Extension = Extension.FromPath(path);