iBowie / BowieD.Unturned.NPCMaker

Unturned NPC Maker
GNU General Public License v3.0
35 stars 24 forks source link

[BUG] NPCMaker Locks Unturned Files #43

Open sunnamed434 opened 7 months ago

sunnamed434 commented 7 months ago

The problem is once you run NPCMaker you cannot normally remove any mods/files/maps etc from the Unturned directory.

I guess this problem is coming from the wrong reading/loading of the Icons/Files into NPCMaker, maybe it also make sense to cache all these files or smth like that

iBowie commented 7 months ago

Can you provide with steps on how to replicate the issue? Since off the top of my head I recall asset-reading being wrapped in using statements, ensuring they will close the file stream once they done reading it.

sunnamed434 commented 7 months ago

Steps to reproduce: Open NPC Maker, it must show the load bar that says Importing Assets or smth after the app is loaded, try to remove Workshop mods from the Unturned directory, it will say: File is used by another process, however, once I close the NPCMaker everything is just fine, I can remove anything as usually

On the screenshot, I'm trying to delete a random folder from steamapps\workshop\content\304930 image

iBowie commented 7 months ago

After checking opened handles after importing assets I can confirm that app indeed keeps some files open. These files are map images. Will fix.

sunnamed434 commented 7 months ago

Thanks!