mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
ask user to use .000 file if it is detected when they have selected a .001 file.
This commit is contained in:
parent
cba65e8f4b
commit
0afe9b19c2
@ -25,6 +25,7 @@ import java.util.SimpleTimeZone;
|
|||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.event.DocumentEvent;
|
import javax.swing.event.DocumentEvent;
|
||||||
import javax.swing.event.DocumentListener;
|
import javax.swing.event.DocumentListener;
|
||||||
@ -191,6 +192,9 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
|||||||
);
|
);
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
|
@NbBundle.Messages({"ImageFilePanel.000.confirmationMessage=The selected file"
|
||||||
|
+ " has extenson .001 but there is a .000 file in the sequence of raw images."
|
||||||
|
+ "\nShould the .000 file be used as the start, instead of the selected .001 file?\n"})
|
||||||
private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
|
private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
|
||||||
String oldText = getContentPaths();
|
String oldText = getContentPaths();
|
||||||
// set the current directory of the FileChooser if the ImagePath Field is valid
|
// set the current directory of the FileChooser if the ImagePath Field is valid
|
||||||
@ -200,7 +204,19 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
|
if (fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
|
||||||
setContentPath(fileChooser.getSelectedFile().getPath());
|
String path = fileChooser.getSelectedFile().getPath();
|
||||||
|
if (path.endsWith(".001")) {
|
||||||
|
String zeroX3_path = StringUtils.removeEnd(path, ".001") + ".000";
|
||||||
|
if (new File(zeroX3_path).exists()) {
|
||||||
|
int showConfirmDialog = JOptionPane.showConfirmDialog(this,
|
||||||
|
Bundle.ImageFilePanel_000_confirmationMessage(),
|
||||||
|
"Choose .001 file?", JOptionPane.YES_NO_OPTION);
|
||||||
|
if (showConfirmDialog == JOptionPane.YES_OPTION) {
|
||||||
|
path = zeroX3_path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setContentPath(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateHelper();
|
updateHelper();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user