Skip to content

windows vs linux path separators.... #1

@mistyn8

Description

@mistyn8

Getting an error on Windows...

digging into it
final String fileName = fileSystemEntity.path.split("/").last; isn't gettting the filename as

fileSystemEntity.path returns something like

android/app/src/main/kotlin/com/example/stacked_ehq\MainActivity.kt

quick and dirty fix..
final String fileName = fileSystemEntity.path.replaceAll('\\', '/').split("/").last;

[√] Flutter (Channel dev, 1.18.0-10.0.pre, on Microsoft Windows [Version 10.0.18363.778], locale en-GB)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 3.6)
[√] VS Code (version 1.44.2)
[√] Connected device (3 available)

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