Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PathCollapser.Collapse breaks UNC paths #3859

Closed
2 tasks done
nils-a opened this issue Apr 4, 2022 · 1 comment · Fixed by #3865
Closed
2 tasks done

PathCollapser.Collapse breaks UNC paths #3859

nils-a opened this issue Apr 4, 2022 · 1 comment · Fixed by #3865
Assignees
Labels
Milestone

Comments

@nils-a
Copy link
Member

nils-a commented Apr 4, 2022

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

Cake runner

Cake .NET Tool

Cake version

2,1,0

Operating system

Linux, Windows

Operating system architecture

64-Bit

CI Server

No response

What are you seeing?

Given the following Cake script:

var target = Argument("target", "Default");

Task("Default")
.Does(() => {
   var one = new DirectoryPath("\\\\server\\share\\folder\\..");
   var two = one.Collapse();
   Information($"1: {one.FullPath} IsUNC:{one.IsUNC}");
   Information($"2: {two.FullPath} IsUNC:{two.IsUNC}");
});

RunTarget(target);

The output is:

========================================
Default
========================================
1: \\server\share\folder\.. IsUNC:True
2: //server/share IsUNC:False

What is expected?

I would expect a collapsed UNC path to start with \\ and not //, also I would expect IsUNC to return true.

Steps to Reproduce

See script above.

Output log

No response

@nils-a nils-a self-assigned this Apr 7, 2022
@nils-a nils-a added the Bug label Apr 7, 2022
@nils-a nils-a linked a pull request Apr 7, 2022 that will close this issue
@nils-a nils-a added this to the v2.2.0 milestone Apr 7, 2022
devlead added a commit that referenced this issue Apr 14, 2022
(#3858, #3859) Made PathCollapser aware of different formats
@cake-build-bot
Copy link

🎉 This issue has been resolved in version v2.2.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants