Skip to content

Commit dfd62b0

Browse files
johannes-mannertobiasdiez
authored andcommitted
fix #3693 (#3702)
Duplicated functionality, if file already exists. Asks twice, if a file should be overriden.
1 parent 39fd85f commit dfd62b0

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/main/java/org/jabref/gui/exporter/ExportAction.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.jabref.gui.exporter;
22

33
import java.awt.event.ActionEvent;
4-
import java.nio.file.Files;
54
import java.nio.file.Path;
65
import java.util.List;
76
import java.util.stream.Collectors;
@@ -81,14 +80,6 @@ private void export(Path file, FileChooser.ExtensionFilter selectedExtensionFilt
8180
FileUtil.addExtension(file, selectedExtension);
8281
}
8382

84-
if (Files.exists(file)) {
85-
// Warn that the file exists:
86-
if (JOptionPane.showConfirmDialog(frame,
87-
Localization.lang("'%0' exists. Overwrite file?", file.getFileName().toString()),
88-
Localization.lang("Export"), JOptionPane.OK_CANCEL_OPTION) != JOptionPane.OK_OPTION) {
89-
return;
90-
}
91-
}
9283
final Exporter format = FileFilterConverter.getExporter(selectedExtensionFilter, exporters).orElseThrow(() -> new IllegalStateException("User didn't selected a file type for the extension"));
9384
List<BibEntry> entries;
9485
if (selectedOnly) {

0 commit comments

Comments
 (0)