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

Issue with folders named like 'X: Something' #1460

Open
Ribesg opened this issue Mar 23, 2024 · 1 comment
Open

Issue with folders named like 'X: Something' #1460

Ribesg opened this issue Mar 23, 2024 · 1 comment

Comments

@Ribesg
Copy link

Ribesg commented Mar 23, 2024

Okio behaves weirdly with folders named like X: Something on at least MacOS Arm64 and Linux X64.

You can easily reproduce the issue in a Gradle project with native targets:

fun main() {
    FileSystem.SYSTEM.run {
        createDirectories("build/tmp/Working Folder".toPath())
        createDirectories("build/tmp/X: Broken Folder".toPath())
        list("build/tmp".toPath()).forEach(::println)
    }
}
tmp$ ./gradlew clean runDebugExecutableMacosArm64

> Task :runDebugExecutableMacosArm64
X: Broken Folder
build/tmp/Working Folder

BUILD SUCCESSFUL in 3s
10 actionable tasks: 6 executed, 4 up-to-date
@swankjesse
Copy link
Collaborator

swankjesse commented Mar 23, 2024

Oooh thanks for reporting this. I made a design decision to make path processing platform-independent, which is what’s causing grief here.

We’re incorrectly interpreting this as a Windows drive letter followed by a path name, rather than a single path name where the 2nd character is a colon. Ugh.

I’ll see what we can do to fix!

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

No branches or pull requests

3 participants