From 9c1d3dabcfde160155f2b1851aa0942921d5b0ed Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 19 Oct 2022 15:45:29 +0200 Subject: [PATCH] Fix dir eseguibile --- IOB-WIN-NEXT/IobGeneric.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/IOB-WIN-NEXT/IobGeneric.cs b/IOB-WIN-NEXT/IobGeneric.cs index 7312a5bd..816ee7be 100644 --- a/IOB-WIN-NEXT/IobGeneric.cs +++ b/IOB-WIN-NEXT/IobGeneric.cs @@ -4683,8 +4683,12 @@ namespace IOB_WIN_NEXT } // test directory... + string basePath = Application.StartupPath; + + /* TEST DIRECTORY + // questa prende dir = IOB-MAN string basePath = Directory.GetCurrentDirectory(); - string appStart = Application.StartupPath; + // alternative OK string exePath = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath); string sacBaseDir = System.AppContext.BaseDirectory; lgInfo("--------- DIR TEST -------------"); @@ -4693,6 +4697,7 @@ namespace IOB_WIN_NEXT lgInfo($"exePath: {exePath}"); lgInfo($"sacBaseDir: {sacBaseDir}"); lgInfo("----------------------"); + */ string localPath = Path.Combine(basePath, locDir); lgInfo($"basePath: {basePath} | localPath: {localPath}");