Skip to content

Commit

Permalink
name fix now working
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyFFM committed May 25, 2018
1 parent dcdf03d commit 0b16319
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ private void Conversion(int[] index, string[] filename, int[] nonces)
}
else
{
scoopReadWriter = new ScoopReadWriter(filename[i], outputDir.Text + "\\" + Path.GetFileName(filename[i]).Replace(nonces.ToString() + "_" + nonces.ToString(), nonces.ToString()));
scoopReadWriter = new ScoopReadWriter(filename[i], outputDir.Text + "\\" + Path.GetFileName(filename[i]).Replace(nonces[i].ToString() + "_" + nonces[i].ToString(), nonces[i].ToString()));
}
scoopReadWriter.Open();

Expand Down Expand Up @@ -683,7 +683,8 @@ private void Conversion(int[] index, string[] filename, int[] nonces)
// close reader/writer
scoopReadWriter.Close();
// rename file
System.IO.File.Move(filename[i], filename[i].Replace(nonces[i].ToString() + "_" + nonces[i].ToString(), nonces[i].ToString()));
if (outputDir.Text != "")
System.IO.File.Move(filename[i], filename[i].Replace(nonces[i].ToString() + "_" + nonces[i].ToString(), nonces[i].ToString()));
// update status
setStatus(index[i], 2, "Plot successfully converted.");

Expand Down

0 comments on commit 0b16319

Please sign in to comment.