Skip to content

Frosting DirectoryPath + ConvertableFilePath combines strings instead of paths #4442

@MihaMarkic

Description

@MihaMarkic

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions