"Correct filenames": utf8 support

This commit is contained in:
chudov
2012-07-15 03:43:50 +00:00
parent cc682decb5
commit a24cc011c9
4 changed files with 7 additions and 55 deletions

View File

@@ -823,19 +823,17 @@ namespace JDP
{
if (toolStripButtonCorrectorOverwrite.Checked)
{
using (StreamWriter sw = new StreamWriter(pathIn, false, CUESheet.Encoding))
sw.Write(fixedCue);
CUESheet.WriteText(pathIn, fixedCue);
BatchLog("corrected ({0}).", pathIn, extension);
}
else
{
string pathFixed = Path.ChangeExtension(pathIn, extension + ".cue");
if (File.Exists(pathFixed))
string fixedPath = Path.ChangeExtension(pathIn, extension + ".cue");
if (File.Exists(fixedPath))
BatchLog("corrected cue already exists.", pathIn);
else
{
using (StreamWriter sw = new StreamWriter(pathFixed, false, CUESheet.Encoding))
sw.Write(fixedCue);
CUESheet.WriteText(fixedPath, fixedCue);
BatchLog("corrected ({0}).", pathIn, extension);
}
}