ModOrganizer2 / modorganizer

Mod manager for various PC games. Discord Server: https://discord.gg/ewUVAqyrQX if you would like to be more involved
http://www.nexusmods.com/skyrimspecialedition/mods/6194
GNU General Public License v3.0
2.19k stars 163 forks source link

Information page : preview hidden files #1087

Open Shine753 opened 4 years ago

Shine753 commented 4 years ago

Into the informations page, being able to open a hidden item by double clicking it.

isanae commented 4 years ago

Can you clarify? Hidden items are just files renamed to .mohidden.

Al12rs commented 4 years ago

Probably means that you don't get preview on hidden items since the extension does not match .dds for example

Shine753 commented 4 years ago

That's it

Shine753 commented 4 years ago

As a suggestion, instead of mohidden(ing) these files by suffix, you could mohidden them by prefix. That way, they can still be opened, and don't loose their icon.

atrHusK commented 4 years ago

I wouldn't prefer a prefix, the current system is very safe but when using a prefix system there is always the possibility of a mod or game using that same prefix as something that should normally just work. It also makes it hard to order the files right in an explorer like tool.

I've not looked at the code but I assume there is logic that results in the context menu options present, it could just use a dumb workarround by doing a regex replace like \.mohidden$ and then consider the file extension that remains to be the real extension and determine the options from there. The same approach might be used for one of the requests I put in #1029

Shine753 commented 4 years ago

I fully understand that. The only problem I can see using a suffix by file extension is that the file cannot be anymore opened by the explorer, nor found by file indexers. Also it comes then with a blank icon.

Al12rs commented 4 years ago

760 is what we plan for file hiding in the future. For mohidden files i would just create a temp file with the correct extension and pass that to whatever preview plugin. We need to do the temp thing for files inside archives anyways.

https://github.com/ModOrganizer2/modorganizer/labels/area%3A%20file-hiding for all our stuff related to hiding.

atrHusK commented 4 years ago

Another option would be to put the .mohidden. before the extension (like ahiddenfile.mohidden.nif) and let MO2 ignore files based on that pattern. I read that the vfs solution in #760 is not a small feature to implement, if those plans are nowhere near completion than this might be something of a quick-win instead for the time being?

Al12rs commented 4 years ago

It's not that hard to do in theory. Changing to .mohidden.ext still has half the of the same changes to make, changing all hiding/unhiding functions, making all the relevant code treat those files accordingly etc. It's a better idea to just aim for VFS hiding directly instead.