Skip to content

Commit

Permalink
Fixed plugin path to always use forward slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
igor84 committed May 24, 2024
1 parent 4409be4 commit e74a842
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ internal sealed class NugetForUnityPluginId : IEquatable<NugetForUnityPluginId>
internal NugetForUnityPluginId([NotNull] string name, [NotNull] string path)
{
Name = name;
Path = System.IO.Path.IsPathRooted(path) ? PathHelper.GetRelativePath(UnityPathHelper.AbsoluteProjectPath, path) : path;
if (System.IO.Path.IsPathRooted(path))
{
path = PathHelper.GetRelativePath(UnityPathHelper.AbsoluteProjectPath, path);
}

// We make sure forward slashes are used, so it works on non Windows platforms as well
Path = path.Replace("\\", "/");
}

/// <summary>
Expand Down

2 comments on commit e74a842

@igor84
Copy link
Collaborator Author

@igor84 igor84 commented on e74a842 May 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoC0de I hope you don't mind, I pushed this and previous commit directly to master with minor fixes.

@JoC0de
Copy link
Collaborator

@JoC0de JoC0de commented on e74a842 May 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@igor84 not a biggie. I just think creating a PR even if you directly merge it makes it easier to track the changes e.g. wenn generating changelogs etc.

Please sign in to comment.