f4exb / sdrangel

SDR Rx/Tx software for Airspy, Airspy HF+, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay and FunCube
GNU General Public License v3.0
2.72k stars 420 forks source link

Fix Sigmf Record: overwriting sigmf-data or sigmf-meta #2136

Closed mxi-box closed 3 weeks ago

mxi-box commented 3 weeks ago

Replaced std::ofstream by QFile to support resize(qint64) (or ftruncate)

The original code will open sigmf-meta without append flag. It causes file emptied if we don't start any recording after opening it. Fix potential bug that may cause sigmf-meta saved wrongly without calling ftruncate.

Check whether it works on other OS if possible.