Zingabopp / BeatSync

Beat Saber plugin to automatically download beatmaps.
Other
247 stars 22 forks source link

Error Extracting Song #26

Closed Tefery closed 3 years ago

Tefery commented 3 years ago

When Beatsync try to extract the song "4B48 (Camellia (Feat. Nanahira) - Can I Friend You On Bassbook Lol [Bassline Yatteru LOL]", throws an "System.IO.DirectoryNotFoundException", I suspect that for some reason, has adding an space at end of the name folder when try to access it.

[BeatSyncLib - Warn]: No FavoriteMappers found, skipping... [BeatSyncLib - Info]: Finished BeatSaver reading: (0/0). [BeatSyncLib - Info]: Starting BeastSaberBookmarks feed... [BeatSyncLib - Error]: Error extracting J:\Oculus\Software\hyperbolic-magnetism-beat-saber\Beat Saber_Data\CustomLevels\4B48 (Camellia (Feat. Nanahira) - Can I Friend You On Bassbook Lol [Bassline Yatteru LOL] [BeatSyncLib - Error]: System.IO.DirectoryNotFoundException: Could not find a part of the path 'J:\Oculus\Software\hyperbolic-magnetism-beat-saber\Beat Saber_Data\CustomLevels\4B48 (Camellia (Feat. Nanahira) - Can I Friend You On Bassbook Lol [Bassline Yatteru LOL] \Camellia (Feat. Nanahira) - Can I Friend You On Bassbook Lol [Bassline Yatteru LOL].egg'. at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync) at System.IO.Compression.ZipFileExtensions.ExtractToFile(ZipArchiveEntry source, String destinationFileName, Boolean overwrite) at BeatSyncLib.Utilities.FileIO.ExtractZip(Stream zipStream, String extractDirectory, Boolean overwriteTarget, String sourcePath) in /home/runner/work/BeatSync/BeatSync/BeatSyncLib/Utilities/FileIO.cs:line 281 [BeatSyncLib - Warn]: Unable to get hash for '(4B48) Camellia (Feat. Nanahira) - Can I Friend You On Bassbook Lol [Bassline Yatteru LOL] by RaxanZeric', hasher returned null. [BeatSyncConsole - Info]: Job completed successfully: (4B48) Camellia (Feat. Nanahira) - Can I Friend You On Bassbook Lol [Bassline Yatteru LOL] by RaxanZeric [BeatSyncLib - Info]: Finished BeastSaberBookmarks feed: (194/194, 194 skipped). [BeatSyncLib - Info]: Finished BeastSaber reading: (194/194, 194 skipped). [BeatSyncConsole - Info]: Finished after 14,0763698s: 194/194, 194 skipped Stopping LogManager. Press Enter to continue...

errorBeatSync

Zingabopp commented 3 years ago

You hit a really nice edge case where one of the files in the zip (the audio file name) was too long when combined with the folder path, so BeatSync automatically trimmed the song folder name. While I was trimming the original folder name, I forgot to trim the result of that check. Will be fixed in the next release.

Build that fixes it: https://github.com/Zingabopp/BeatSync/actions/runs/364596065