Skip to content

Conversation

compnerd
Copy link
Collaborator

The literal value needs to be converted on different platform.
Explicitly construct the type rather than trying to change the literal
to the platform character type.

The literal value needs to be converted on different platform.
Explicitly construct the type rather than trying to change the literal
to the platform character type.
@@ -163,7 +163,7 @@ final class FileOperationsTest: XCTestCase {

#if !os(Windows)
func testResizeFile() throws {
let fd = try FileDescriptor.open("/tmp/\(UUID().uuidString).txt", .readWrite, options: [.create, .truncate], permissions: .ownerReadWrite)
let fd = try FileDescriptor.open(FilePath("/tmp/\(UUID().uuidString).txt"), .readWrite, options: [.create, .truncate], permissions: .ownerReadWrite)
Copy link
Member

Choose a reason for hiding this comment

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

Hm. This feels like it indicates an API bug.

Copy link
Contributor

Choose a reason for hiding this comment

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

The string-taking version should either be disfavored or updated to construct a file path.

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

Successfully merging this pull request may close these issues.

3 participants