SongCore
SongCore copied to clipboard
RetrieveAllSongs failed when song directory has ? < > \ * | or "
Having certain NTFS illegal characters in the directory name breaks file loading in different ways. An example error:
[INFO @ 15:15:03 | SongCore] Starting full song refresh
[ERROR @ 15:15:03 | SongCore] RetrieveAllSongs failed:
[ERROR @ 15:15:03 | SongCore] System.ArgumentException: Illegal characters in path.
[ERROR @ 15:15:03 | SongCore] at System.IO.Path.CheckInvalidPathChars (System.String path, System.Boolean checkAdditional) [0x00021] in <437ba245d8404784b9fbab9b439ac908>:0
[ERROR @ 15:15:03 | SongCore] at System.IO.Path.InternalCombine (System.String path1, System.String path2) [0x00022] in <437ba245d8404784b9fbab9b439ac908>:0
[ERROR @ 15:15:03 | SongCore] at System.IO.FileSystemEnumerableIterator`1[TSource].CreateSearchResult (System.IO.Directory+SearchData localSearchData, Microsoft.Win32.Win32Native+WIN32_FIND_DATA findData) [0x00000] in <437ba245d8404784b9fbab9b439ac908>:0
[ERROR @ 15:15:03 | SongCore] at System.IO.FileSystemEnumerableIterator`1[TSource].MoveNext () [0x001aa] in <437ba245d8404784b9fbab9b439ac908>:0
[ERROR @ 15:15:03 | SongCore] at System.Collections.Generic.List`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) [0x00077] in <437ba245d8404784b9fbab9b439ac908>:0
[ERROR @ 15:15:03 | SongCore] at System.IO.Directory.InternalGetFileDirectoryNames (System.String path, System.String userPathOriginal, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) [0x0000f] in <437ba245d8404784b9fbab9b439ac908>:0
[ERROR @ 15:15:03 | SongCore] at System.IO.Directory.InternalGetDirectories (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) [0x00000] in <437ba245d8404784b9fbab9b439ac908>:0
[ERROR @ 15:15:03 | SongCore] at System.IO.Directory.GetDirectories (System.String path) [0x0000e] in <437ba245d8404784b9fbab9b439ac908>:0
[ERROR @ 15:15:03 | SongCore] at SongCore.Loader+<>c__DisplayClass85_0.<RetrieveAllSongs>b__0 () [0x003da] in <7380ced676a54277b17b1c1848025549>:0
[INFO @ 15:15:03 | SongCore] Loaded 0 new songs (0 in CustomLevels | 0 in seperate folders) in 0.0068461 seconds
[INFO @ 15:15:03 | SongCore] Updating cached hashes for 0 songs!
System.IO.IOException: Error 123 with ? and *
System.ArgumentException: Illegal characters in path. with < > | and "
System.ArgumentException: Second path fragment must not be a drive or UNC name. with \
No error (all songs load normally) with / and :
And of course removing the illegal character also allows all songs to load normally.
Log compilation of errors from each illegal character
The Linux filesystem ext4 allows characters that NTFS doesn't, so a niche bug but worth documenting.