Kylemc1413 / SongCore

A plugin for handling custom song additions in Beat Saber.
MIT License
86 stars 48 forks source link

[Bug] Refreshing deletes all custom levels #162

Closed rcelyte closed 1 month ago

rcelyte commented 2 months ago

After dropping a level in my custom levels folder and hitting Ctrl+R, every single level in every single folder listed in my folders.xml (WIPs included 😭) got deleted, except for the newly added one.

The only messages of note in the logs were a few exceptions like this thrown during refresh:

Exception trying to delete song: Z:\home\rcelyte\Downloads\Beat_Saber_Modding\.levels\WIP\Test Track
System.IO.DirectoryNotFoundException: Could not find a part of the path '26-01-2021_17-12-25\EasyLawless.dat'.
  at System.IO.FileSystem.RemoveDirectoryRecursive (System.String fullPath, Interop+Kernel32+WIN32_FIND_DATA& findData, System.Boolean topLevel) [0x0014c] in <51fded79cd284d4d911c5949aff4cb21>:0 
  at System.IO.FileSystem.RemoveDirectory (System.String fullPath, System.Boolean recursive) [0x00036] in <51fded79cd284d4d911c5949aff4cb21>:0 
  at System.IO.Directory.Delete (System.String path, System.Boolean recursive) [0x00006] in <51fded79cd284d4d911c5949aff4cb21>:0 
  at SongCore.Loader.DeleteSingleSong (System.String folderPath, System.Boolean deleteFolder) [0x00106] in C:\Users\Meivyn\Downloads\SongCore\source\SongCore\Loader.cs:815 

This was with SongCore 3.14.12 on Beat Saber 1.37.3

Meivyn commented 2 months ago

First, I am sorry if I messed up on that. That looks like I might have missed an important point in https://github.com/Kylemc1413/SongCore/commit/61b640375a56836afab2a844a15c7b0ad8de02b7. Can you send the full log and that folders.xml please?

rcelyte commented 2 months ago

Log: _latest.log Folders: folders.xml