From 07764eb0a2e349b9d8482b877005bd351be8d5ff Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Mon, 16 Dec 2019 04:34:38 +0100 Subject: [PATCH] Fixed rename and digest compute. --- src/fr/devinsy/videocut/VideoCutGUI.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fr/devinsy/videocut/VideoCutGUI.java b/src/fr/devinsy/videocut/VideoCutGUI.java index 0d77072..d5a8f57 100644 --- a/src/fr/devinsy/videocut/VideoCutGUI.java +++ b/src/fr/devinsy/videocut/VideoCutGUI.java @@ -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 + "]");