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

Frosting DirectoryPath + ConvertableFilePath combines strings instead of paths #4442

Open
2 tasks done
MihaMarkic opened this issue Jan 14, 2025 · 1 comment
Open
2 tasks done

Comments

@MihaMarkic
Copy link
Contributor

Prerequisites

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

Cake runner

Cake Frosting

Cake version

5.0.0

Operating system

N/A

Operating system architecture

N/A

CI Server

No response

What are you seeing?

DirectoryPath dp = context.Directory("X");
var fp = context.File("F");
(dp + fp).ToString()

The code above would output XF instead of X/F (or X\F on Windows). It's a similar issue to #3352 I guess - missing an overload of + operator between DirectoryPath and ConvertableFilePath.
Is this by design or simply nobody implemented it yet?

What is expected?

The output should be X/F (or X\F on Windows).

Steps to Reproduce

DirectoryPath dp = context.Directory("X");
var fp = context.File("F");
(dp + fp).ToString()

Output log

No response

@MihaMarkic
Copy link
Contributor Author

Meanwhile dp.CombineWithFile(fp) produces expected result.

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

No branches or pull requests

1 participant