Fix Stupid

This commit is contained in:
Mbucari 2023-06-14 11:35:11 -06:00
parent 697f797509
commit 7a9c6720c7
2 changed files with 8 additions and 17 deletions

View File

@ -73,23 +73,15 @@ namespace FileLiberator
} }
else else
{ {
try var realMp3Path
{ = FileUtility.SaferMoveToValidPath(
var realMp3Path mp3File.Name,
= FileUtility.SaferMoveToValidPath( proposedMp3Path,
mp3File.Name, Configuration.Instance.ReplacementCharacters,
proposedMp3Path, extension: "mp3",
Configuration.Instance.ReplacementCharacters, Configuration.Instance.OverwriteExisting);
extension: "mp3",
Configuration.Instance.OverwriteExisting);
OnFileCreated(libraryBook, realMp3Path); OnFileCreated(libraryBook, realMp3Path);
}
catch
{
return new StatusHandler { "Failed to move decrypted files to Books directory" };
throw;
}
} }
} }
catch (Exception ex) catch (Exception ex)

View File

@ -94,7 +94,6 @@ namespace FileLiberator
//Only fail if the downloaded audio files failed to move to Books directory //Only fail if the downloaded audio files failed to move to Books directory
if (moveFilesTask.IsFaulted) if (moveFilesTask.IsFaulted)
{ {
return new StatusHandler { "Failed to move decrypted files to Books directory" };
throw; throw;
} }
} }