mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-19 16:40:26 +02:00
Made workspace user file try to use workspace-relative paths
This commit is contained in:
parent
10da44e341
commit
980132c3cc
4 changed files with 77 additions and 26 deletions
|
@ -8,6 +8,7 @@ using System.Diagnostics;
|
|||
using System.Threading;
|
||||
using IDE.Util;
|
||||
using IDE.util;
|
||||
using System.IO;
|
||||
|
||||
namespace IDE
|
||||
{
|
||||
|
@ -494,6 +495,25 @@ namespace IDE
|
|||
return options;
|
||||
}
|
||||
|
||||
public void GetWorkspaceRelativePath(StringView inAbsPath, String outRelPath)
|
||||
{
|
||||
if ((inAbsPath.Length > mDir.Length) &&
|
||||
(Path.Equals(.(inAbsPath, 0, mDir.Length), mDir)) &&
|
||||
(Path.IsDirectorySeparatorChar(inAbsPath[mDir.Length])))
|
||||
{
|
||||
outRelPath.Append(StringView(inAbsPath, mDir.Length + 1));
|
||||
}
|
||||
else
|
||||
outRelPath.Append(inAbsPath);
|
||||
}
|
||||
|
||||
public void GetWorkspaceAbsPath(StringView inRelPath, String outAbsPath)
|
||||
{
|
||||
if (inRelPath.IsEmpty)
|
||||
return;
|
||||
Path.GetAbsolutePath(inRelPath, mDir, outAbsPath);
|
||||
}
|
||||
|
||||
public void Serialize(StructuredData data)
|
||||
{
|
||||
void WriteStrings(String name, List<String> strs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue