zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit c75762a193db906bd181cd58867c97834a7721f9
parent 12a84b1cf24ccd4eefbfd02dc31bd214bbe25060
Author: Johannes Lorenz <[email protected]>
Date:   Sat, 17 Jun 2023 22:45:46 +0200

Savefiles: Show diff in case of failure

Diffstat:
Msrc/Misc/MiddleWare.cpp | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/Misc/MiddleWare.cpp b/src/Misc/MiddleWare.cpp @@ -844,9 +844,12 @@ public: std::cout << savefile << std::endl; std::cerr << "Cannot write OSC savefile!! (see tmp1.txt and tmp2.txt)" << std::endl; - std::ofstream tmp1("tmp1.txt"), tmp2("tmp2.txt"); - tmp1 << xml; - tmp2 << xml2; + { + std::ofstream tmp1("tmp1.txt"), tmp2("tmp2.txt"); + tmp1 << xml; + tmp2 << xml2; + } + system("diff tmp1.txt tmp2.txt"); res = -1; }