Fixed rename and digest compute.

This commit is contained in:
Christian P. MOMON 2019-12-16 04:34:38 +01:00
parent 1dc6dedb58
commit 07764eb0a2

View file

@ -35,6 +35,8 @@ import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
import org.apache.commons.io.FilenameUtils;
import com.jgoodies.forms.factories.FormFactory;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.FormLayout;
@ -183,8 +185,8 @@ public class VideoCutGUI extends JFrame
case '!':
{
String command = String.format("mv t %s; md5sum %s > %s.md5", VideoCutGUI.this.data.getEscapedFileName(), VideoCutGUI.this.data.getEscapedFileName(),
VideoCutGUI.this.data.getEscapedFileName());
String command = String.format("mv t.%s %s; md5sum %s > %s.md5", FilenameUtils.getExtension(VideoCutGUI.this.data.getEscapedFileName()),
VideoCutGUI.this.data.getEscapedFileName(), VideoCutGUI.this.data.getEscapedFileName(), VideoCutGUI.this.data.getEscapedFileName());
String log = CmdExec.run("bash", "-c", command);
System.out.println("log=[" + log + "]");