Skip to content

Inconsistent behavior for empty file paths between Android and iOS #592

@tgvoskuilen

Description

@tgvoskuilen

There is a behavior difference between Android and iOS for empty file paths. If I add the following test code

LaunchedEffect(Unit) {
    PlatformFile("/made/up/path").delete(mustExist = false)
    PlatformFile("").delete(mustExist = false)
}

The first call with the made up path runs as expected (does nothing on either platform) but the second case is inconsistent. On Android it does nothing, but on iOS it throws the error below

Uncaught Kotlin exception: io.github.vinceglb.filekit.exceptions.FileKitNSURLNullPathException: The NSURL path is null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions