Jorixon / JASM

Just Another Skin Manager
GNU General Public License v3.0
148 stars 16 forks source link

Weird sorting behaviour #195

Closed CazzoPMX closed 3 months ago

CazzoPMX commented 4 months ago

Describe the bug Clicking "Reorganizing" just deleted my SkinSelectImpact folder without resorting all mods (there were some that I am missing now)

EDIT: After doing a through depth search, I found the missing folders inside of "Furina", but that's still weird as heck.

To Reproduce

  1. If I knew what made it do it, I would tell you, but I can't look into it now, can I? (/sarcasm off)

Expected behavior That it stays, or at least moves them into "others"

Desktop (please complete the following information):

Which version of Windows operating system am I running?

Additional context I did have Folder Junctions to flatten out the path depth into the root "Mod" folder, maybe that has something to do with it? The Reorganizer did report issues with unresolved Symbolic Links after moving them, but I did not think much of it.

EDIT: Well, the folder had a Mod for NPC-Furina back from when she still was unreleased, so that might have been the reason.

Jorixon commented 3 months ago

I'm happy to hear that it didn't delete your mods. I never intended for it to delete anything in your mods folder, (except empty character folders due to JASM folder structure migration). If you haven't already checked it, in the root of the jasm folder there is a logs folder with a log.txt file. JASM is quite verbose when reorganizing mods and should tell you everything it did.

Some explanation

The process is relatively straightforward. JASM loops through all the folders inside the mods folder and based on some criterias it decides what to do with it. It assumes a flat folder structure where mods are loosely stored in the mods folder or that it uses the old JASM folder structure.

If the folder name exactly matches a character folder, it does some extra checks to see if JASM created it or if it's a mod with the exact name as a character. If it's a mod jasm will not touch it at all.

If the folder name exactly matches a category, it will be ignored as this is the default folder structure JASM uses. 3Dmigoto/Mods/Categories/Characters/\<skin folders>

For the rest of the folders, it tries to first detect the character based on mod file names with extensions like .buf, .dds and .ib, it searches reclusively. These files are usually named after the actual character. If it doesn't find any it will fallback to simple name matching. This uses keywords and fuzzing to try and match a character. This is quite skewed towards long names like the "A Thousand Floating Dreams" weapon lol. But overall, it functions quite well.

I don't know how SkinSelectImpact stores its mods and unsure what you mean exactly with "Folder Junctions to flatten out the path". I speculate that when jasm was looping trough folders, it (wrongly) matched the folder as a Furina mod somehow, and moved it to her character folder. Or maybe something really weird happened because of the junctions idk ._.

CazzoPMX commented 3 months ago

Just to explain you what I meant with "Folder Junction", it is a special type of symbolic link that makes it appear as if the target contents are physically stored at this location

CazzoPMX commented 3 months ago

I'm fine with the extra explanation added to the Tooltip, so it is considered solved for me