Skip to content

Problematic path operation to determine file name without extension #219

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.

Activity

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

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