Add FilePath helper class

This commit is contained in:
ClemensFischer 2022-12-06 18:07:38 +01:00
parent 7d1d7dbe23
commit 421f323116
5 changed files with 27 additions and 4 deletions

View file

@ -20,8 +20,7 @@ namespace MapControl
{
public static async Task<Tuple<BitmapSource, Matrix>> ReadGeoTiff(string sourcePath)
{
var file = await StorageFile.GetFileFromPathAsync(
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, sourcePath));
var file = await StorageFile.GetFileFromPathAsync(FilePath.GetFullPath(sourcePath));
using (var stream = await file.OpenReadAsync())
{

View file

@ -50,7 +50,7 @@ namespace MapControl
{
ImageSource image = null;
path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, path);
path = FilePath.GetFullPath(path);
if (File.Exists(path))
{