[fix?:] windows paths (ai-based since windows is boring)

This commit is contained in:
2026-05-18 11:42:32 +02:00
parent 67d007bb31
commit b3ab21ae38
4 changed files with 58 additions and 33 deletions
+6 -3
View File
@@ -13,7 +13,7 @@ public class WikiService
// prefer global wiki storage path if configured
if (Global._instance != null && !string.IsNullOrWhiteSpace(Global._instance.wiki_storage_path))
{
var cfg = Global._instance.wiki_storage_path;
var cfg = PathUtilities.NormalizeFileSystemPath(Global._instance.wiki_storage_path);
WikiRootFullPath = Path.IsPathRooted(cfg)
? cfg
: Path.Combine(Directory.GetCurrentDirectory(), cfg);
@@ -25,8 +25,11 @@ public class WikiService
wikiRoot = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
"logofclient",
"wiki");
wikiRoot = PathUtilities.NormalizeFileSystemPath(wikiRoot);
WikiRoot = wikiRoot;
WikiRootFullPath = Path.Combine(Directory.GetCurrentDirectory(), wikiRoot);
WikiRootFullPath = Path.IsPathRooted(wikiRoot)
? wikiRoot
: Path.Combine(Directory.GetCurrentDirectory(), wikiRoot);
}
}
@@ -68,4 +71,4 @@ public class WikiService
if (!File.Exists(path)) return Task.FromResult<string?>(null);
return File.ReadAllTextAsync(path);
}
}
}