jhalter / mobius

A Hotline server implemented in Golang for macOS, Linux, and Windows operating systems
MIT License
78 stars 8 forks source link

Fix corrupt file info forks #139

Closed jhalter closed 5 months ago

jhalter commented 5 months ago

This fixes a bug that happens when:

  1. Optional "Enable Resource Forks" feature is true
  2. A file comment is added
  3. The comment is updated to be shorter than the original

The expected behavior is that the hidden .info file is replaced with the new data, but this wasn't happening because the file flag was not set to truncate on write.