Skip to content

Commit

Permalink
参数中含有相对路径的进行补全
Browse files Browse the repository at this point in the history
  • Loading branch information
AvenSun committed Aug 5, 2024
1 parent 070fe82 commit 836a8e3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Stardust/Deployment/ZipDeploy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,25 @@ public Boolean Parse(String[] args)
}
else
{
// 参数中有路径的补全
if (args[i].Contains('/') || args[i].Contains('\\'))
{
//不是绝对路径再补
if (!Path.IsPathRooted(args[i]))
{
//工作目录不为空时
if (!WorkingDirectory.IsNullOrEmpty())
{
args[i] = WorkingDirectory.CombinePath(args[i]).GetFullPath();
}
else
{
args[i] = args[i].GetFullPath();
}
}
WriteLog("参数路径补全 {0}", args[i]);
}

// 其它参数全要,支持 urls=http://*:8000
gs[i] = args[i];
}
Expand Down

0 comments on commit 836a8e3

Please sign in to comment.