rallion / depressurizer

GNU General Public License v3.0
784 stars 78 forks source link

[bug] rename category not assigning games to renamed category #19

Closed eclay42 closed 9 years ago

eclay42 commented 9 years ago

The rename category command isn't reassigning the games to the new category. It appears to delete the old category and create a new one, but any games in the deleted category are not automatically assigned to the new one so the renamed category ends up being empty.

rallion commented 9 years ago

Could you try this again, and check something for me? After renaming the category and confirming that it's empty or missing items, find one of the games that should be assigned (under ) and see if it actually shows the category in its category list.

Thanks!

eclay42 commented 9 years ago

I just tried that and the games that didn't make it didn't list themselves as being in the new category. Some additional information: the first category I just renamed which only had a few games appeared to rename everything correctly, another category with more games (10-20) only had one game correctly reassigned to a new category. A much larger category (100+ games) appeared to work correctly, but I didn't exhaustively check each game. Another small category with 2 games lost both of them.

The only possible correlation I see is that the categories with spaces in them appear to take longer to process and are more likely to lose games.

rallion commented 9 years ago

Okay, I think I've tracked down the cause.

The categories are stored as sorted sets, sorted by name, so changing the name messes things up in weird ways.

Assuming I'm right, it'll be fixed in the next release.

rallion commented 9 years ago

Should be fixed.