wins1ey / LibreSplit

Free speedrun timer with auto splitting and load removal for Linux.
GNU General Public License v3.0
20 stars 7 forks source link

Saving not working correctly? #66

Open DevLaTron opened 3 weeks ago

DevLaTron commented 3 weeks ago

I've built libresplit on an Ubuntu 24.04, and have had a couple of issues:

After these adjustments, I finally managed to get it to run.

I'll leave this here for reference, as it's a "it's ugly, but it works for me" kind of hack.

If I find the time, I might clean this up and get it into correct working order with a PR.

EXtremeExploit commented 1 week ago

From what i read and the current code in that part is that you just added a printf telling the user what the error was when saving a json that failed, json_dump_file in the current code is inverted so the logic is really the same This is how it is right now in master

if (!json_dump_file(json, game->path,
            JSON_PRESERVE_ORDER | JSON_INDENT(2))) {
        error = 1;
    }
json_decref(json);

I dont see any problem with adding a printf to the error code, feel free to PR when you feel like it