itchio / itch-setup

🌀 An installer for the itch.io desktop app
MIT License
64 stars 11 forks source link

Running ~/.itch/itch-setup results in 0-length ~/.itch/itch-setup file #4

Closed fasterthanlime closed 5 years ago

fasterthanlime commented 5 years ago

See https://itch.io/post/566021

When installing the itch app on Linux, itch-setup copies itself to ~/.itch/itch-setup - normally it's being run from another location, so the copy works fine, but if it's already being run from ~/.itch/itch-setup, it's probably opening itself for writing (which truncates the file) and reading (which is now reading a 0-length file), which results in a broken installation.