Skip to content

Commit a025a2e

Browse files
committed
feat: Path.IsRooted を Path.IsPathFullyQualified に変更
1 parent da8d2dd commit a025a2e

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

NeeView/Script/JavascriptEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ public void SetValue(string name, object? value)
188188

189189
private string GetFullPath(string path)
190190
{
191-
if (ScriptDirectory != null && !Path.IsPathRooted(path))
191+
if (ScriptDirectory != null && !Path.IsPathFullyQualified(path))
192192
{
193193
path = Path.Combine(ScriptDirectory, path);
194194
}

NeeView/Styles/ThemeManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ private ThemeProfile ValidateBasedOn(ThemeProfile themeProfile, string? currentP
235235
}
236236
else
237237
{
238-
var path = Path.IsPathRooted(themeProfile.BasedOn) ? themeProfile.BasedOn : Path.Combine(currentPath, themeProfile.BasedOn);
238+
var path = Path.IsPathFullyQualified(themeProfile.BasedOn) ? themeProfile.BasedOn : Path.Combine(currentPath, themeProfile.BasedOn);
239239
if (nests != null && nests.Contains(path)) throw new FormatException($"Circular reference: {path}");
240240
nests = nests is null ? new List<string>() { path } : nests.Append(path);
241241
var baseTheme = ValidateBasedOn(ThemeProfileTools.LoadFromFile(path), Path.GetDirectoryName(path), nests);

NeeView/System/Environment.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ private static string NeeViewProfile
190190
_neeviewProfile = GetEnvironmentValue("NEEVIEW_PROFILE").Trim();
191191
if (!string.IsNullOrEmpty(_neeviewProfile))
192192
{
193-
if (!Path.IsPathRooted(_neeviewProfile))
193+
if (!Path.IsPathFullyQualified(_neeviewProfile))
194194
{
195195
// Error: 環境変数 NEEVIEW_PROFILE は絶対パスではありません
196196
throw new IOException("NEEVIEW_PROFILE: Not an absolute path");
@@ -475,7 +475,7 @@ public static string LogFile
475475
{
476476
_logFile = "";
477477
}
478-
else if (Path.IsPathRooted(logFile))
478+
else if (Path.IsPathFullyQualified(logFile))
479479
{
480480
_logFile = logFile;
481481
}

0 commit comments

Comments
 (0)