Skip to content

Problematic path operation to determine file name without extension #219

@Victorious3

Description

@Victorious3

This fails for files that don't have a file extension and produces paths outside of the Android sandbox.

File("${imageFile.absolutePath.substringBeforeLast(".")}.${format.extension()}")

Kotlin has nameWithoutExtension which uses the file name instead of the whole path.

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