big changes
This commit is contained in:
@@ -14,6 +14,26 @@ public static class PathResolver
|
||||
return Path.GetFullPath(path);
|
||||
}
|
||||
|
||||
return Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, path));
|
||||
return Path.GetFullPath(
|
||||
Path.Combine(
|
||||
AppContext.BaseDirectory,
|
||||
path));
|
||||
}
|
||||
|
||||
public static string ResolveRequiredFile(
|
||||
string configuredPath,
|
||||
string description)
|
||||
{
|
||||
string resolvedPath =
|
||||
ResolvePath(configuredPath);
|
||||
|
||||
if (!File.Exists(resolvedPath))
|
||||
{
|
||||
throw new FileNotFoundException(
|
||||
$"{description} wurde nicht gefunden.",
|
||||
resolvedPath);
|
||||
}
|
||||
|
||||
return resolvedPath;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user