Skip to content

Strange File Names Under Windows #11

@jmkao

Description

@jmkao

When the githubRelease task is used under Windows, the assets are uploaded with names that include their full path, but with \ replaced with ., for instance:

https://github.com/WesGilster/Creation-Workshop-Host/releases

Where the release file is named "C.Users.wgilster.git.Creation-Workshop-Host.host.cwh-DEV001.zip"

When run under Linux, the file name contains only the basename, like:

https://github.com/jmkao/Creation-Workshop-Host/releases

I think, but I'm not sure since I've only looked at this a little, that this might be because of the logic in https://github.com/riiid/gradle-github-plugin/blob/master/src/main/groovy/co/riiid/gradle/ReleaseTask.groovy on line 73:

def name = asset.split('/')[-1]

I think that since you have a File object from the previous line, you can use file.getName() to do the same thing in a platform independent way, but I'm not sure how the name object is used downstream, so I'm not sure if this would have any negative consequences.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions