From 46590d48cd1a93108cc634ae572323cb898098b0 Mon Sep 17 00:00:00 2001 From: "phares@iscn5cg20977xq" Date: Mon, 29 Sep 2025 18:21:11 -0700 Subject: [PATCH] update launch.json and helper files to use J: drive paths --- .vscode/launch.json | 14 ++++++++++++++ ADO2024/PI2/Helper-2024-06-23.cs | 16 ++++++++++------ ADO2025/PI4/Helper-2025-02-04.cs | 2 +- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 78dfa31..11cd240 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,6 +11,20 @@ "preLaunchTask": "Build", "program": "${workspaceFolder}/bin/Debug/net8.0/win-x64/File-Folder-Helper.dll", "args": [ + "s", + "X", + "J:/5-Other-Small/Kanban/Year-Season/2025/2025-0.Winter/1736201197030", + "Day-Helper-2024-06-23", + "*.md", + "##_Sub-tasks", + "-_[code-insiders](", + "index.md", + "-_[,](", + "##_Done", + ".kan", + "J:/5-Other-Small/Kanban/Year-Season", + "316940400000", + "J:/5-Other-Small/Kanban-mestsa003/{}", "s", "X", "X:/Production/Logs/EAF-Warn-Error-002-014-004~X:/Production/Logs/EAF-Info-Warn-002-059-000~X:/Production/Logs/EAF-Info-Warn-002-060-000~X:/Production/Logs/EAF-Info-Warn-002-061-001", diff --git a/ADO2024/PI2/Helper-2024-06-23.cs b/ADO2024/PI2/Helper-2024-06-23.cs index a525ae0..be58105 100644 --- a/ADO2024/PI2/Helper-2024-06-23.cs +++ b/ADO2024/PI2/Helper-2024-06-23.cs @@ -243,7 +243,7 @@ internal static partial class Helper20240623 { "-_[,](", "##_Done", ".kan", - "D:/5-Other-Small/Kanban/Year-Season", + "J:/5-Other-Small/Kanban/Year-Season", "316940400000" ], "problemMatcher": [] @@ -530,8 +530,8 @@ internal static partial class Helper20240623 { private static string? GetInferredCheckDirectory(string directory) { string? result = null; - List directoryNames = []; DirectoryInfo directoryInfo; + List directoryNames = []; string? checkDirectory = directory; directoryNames.Add(Path.GetFileName(checkDirectory)); string pathRoot = Path.GetPathRoot(directory) ?? throw new Exception(); @@ -540,7 +540,6 @@ internal static partial class Helper20240623 { if (string.IsNullOrEmpty(checkDirectory) || checkDirectory == pathRoot) { break; } - directoryInfo = new(checkDirectory); if (!directoryInfo.Exists) { directoryNames.Add(directoryInfo.Name); @@ -548,10 +547,15 @@ internal static partial class Helper20240623 { directoryNames.Reverse(); result = string.IsNullOrEmpty(directoryInfo.LinkTarget) ? checkDirectory : directoryInfo.LinkTarget; for (int j = 0; j < directoryNames.Count; j++) { - result = Path.GetDirectoryName(result) ?? throw new Exception(); + result = Path.GetDirectoryName(result); + if (string.IsNullOrEmpty(result)) { + break; + } } - foreach (string directoryName in directoryNames) { - result = Path.Combine(result, directoryName); + if (!string.IsNullOrEmpty(result)) { + foreach (string directoryName in directoryNames) { + result = Path.Combine(result, directoryName); + } } break; } diff --git a/ADO2025/PI4/Helper-2025-02-04.cs b/ADO2025/PI4/Helper-2025-02-04.cs index 024b12a..19a888c 100644 --- a/ADO2025/PI4/Helper-2025-02-04.cs +++ b/ADO2025/PI4/Helper-2025-02-04.cs @@ -155,7 +155,7 @@ internal static partial class Helper20250204 { string searchPattern = "*.json"; string fullPath = Path.GetFullPath(args[0]); string sourceDirectory = GetSourceDirectory(fullPath); - string rootDirectory = args.Count < 3 || args[2].Length < 16 ? "D:/5-Other-Small/Kanban-mestsa003/{}" : args[2]; + string rootDirectory = args.Count < 3 || args[2].Length < 16 ? "J:/5-Other-Small/Kanban-mestsa003/{}" : args[2]; WriteTaskFile(sourceDirectory, rootDirectory); string sourceDirectoryName = Path.GetFileName(sourceDirectory); DirectoryInfo directoryInfo = new(Path.Combine(sourceDirectory, ".kanbn"));