Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't persist a single file with no file extension #2394

Closed
nickbudi opened this issue Jul 16, 2018 · 1 comment · Fixed by #2408
Closed

Can't persist a single file with no file extension #2394

nickbudi opened this issue Jul 16, 2018 · 1 comment · Fixed by #2408

Comments

@nickbudi
Copy link
Contributor

nickbudi commented Jul 16, 2018

I'm trying to make an app manifest for streamlink-portable

streamlink-portable.json:

{
    "homepage": "https://streamlink.github.io/",
    "version": "0.14.0",
    "license": "BSD-2-Clause",
    "url": "https://github.com/streamlink/streamlink-portable/releases/download/Stable_v0.14.0/Streamlink_for_Windows_Portable_v0.14.0.zip",
    "hash": "40dd1664ac3682cbe622b56a524b6d83677737e3df4bd020a2110570c5c2e3ae",
    "persist": "streamlinkrc",
    "bin": "Streamlink.exe",
    "checkver": {
        "url": "https://github.com/streamlink/streamlink-portable/releases",
        "re": "/releases/tag/(?:Stable_v)?([\\d.]+)"
    },
    "autoupdate": {
        "url": "https://github.com/streamlink/streamlink-portable/releases/download/Stable_v$version/Streamlink_for_Windows_Portable_v$version.zip"
    }
}

scoop install streamlink-portable.json:

Installing 'streamlink-portable' (0.14.0) [64bit]
Loading Streamlink_for_Windows_Portable_v0.14.0.zip from cache
Checking hash of Streamlink_for_Windows_Portable_v0.14.0.zip... ok.
Extracting... done.
Linking C:\Scoop\apps\streamlink-portable\current => C:\Scoop\apps\streamlink-portable\0.14.0
Creating shim for 'Streamlink'.
Persisting streamlinkrc
Cannot create a file when that file already exists.
'streamlink-portable' (0.14.0) was installed successfully!

So streamlinkrc isn't symlinked and a directory named streamlinkrc is created in $persist_dir. Does powershell assume streamlinkrc is a directory since there isn't a file extension?

Also since streamlinkrc exists after extraction, the config would get reset each update anyways right?

Related to #1372

@nickbudi nickbudi changed the title Persist a single file without extension Can't persist a single file with no file extension Jul 16, 2018
@rasa
Copy link
Member

rasa commented Jul 16, 2018

Perhaps if persist has a filespec that doesn't exist, we create an empty directory, if the filespec has a trailing slash, and a file otherwise. @r15ch13?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants