[chore:] string to Uri for filePath

This commit is contained in:
2025-07-03 11:08:24 +02:00
parent a10b01e347
commit 50854e8998

View File

@@ -5,15 +5,15 @@ namespace Logof_Client;
public class DataImport public class DataImport
{ {
public static (bool, KasAddressList) ImportKasAddressList(string pathToCsv, char separator = ',') public static (bool, KasAddressList) ImportKasAddressList(Uri pathToCsv, char separator = ',')
{ {
if (!File.Exists(pathToCsv)) if (!File.Exists(pathToCsv.LocalPath))
{ {
Console.WriteLine($"File not found: {pathToCsv}"); Console.WriteLine($"File not found: {pathToCsv}");
return (false, null); return (false, null);
} }
using var reader = new StreamReader(pathToCsv); using var reader = new StreamReader(pathToCsv.LocalPath);
var headerLine = reader.ReadLine(); var headerLine = reader.ReadLine();
if (headerLine == null) if (headerLine == null)
{ {