Larusso / unity-version-manager

A commandline application to manage unity versions
Apache License 2.0
23 stars 6 forks source link

Fix linux installation for newer Unity versions #387

Closed Larusso closed 11 months ago

Larusso commented 11 months ago

Description

It seems a very old bug suddenly surfaced. The linux pkg install logic is reading the contents of the archive into memory and passing it down to the stdin for the cpio command. I used the singe write call to copy the buffer to the stdin without checking if all bytes are actually written. It seems pure luck that this worked until now. It seems that in recent versions of Unity some packages got so big that a single call to write wasn't writing all the bytes into the memory location.

I replaced the logic with a filestream copy instead. Something I should have done to begin with ...