Replace Path.GetFullPath

This commit is contained in:
ClemensFischer 2022-12-05 23:34:03 +01:00
parent 7b69215a30
commit a342f98334
3 changed files with 9 additions and 4 deletions

View file

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

View file

@ -50,9 +50,11 @@ namespace MapControl
{
ImageSource image = null;
path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, path);
if (File.Exists(path))
{
var file = await StorageFile.GetFileFromPathAsync(Path.GetFullPath(path));
var file = await StorageFile.GetFileFromPathAsync(path);
using (var stream = await file.OpenReadAsync())
{