mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-01 10:47:37 +08:00
PL-7342 Wrong symbols in file name when running report from desktop
This commit is contained in:
parent
46a1cce809
commit
64f4abaabf
@ -50,6 +50,8 @@ import java.io.InputStream;
|
||||
@Scope("prototype")
|
||||
public class DesktopExportDisplay implements ExportDisplay {
|
||||
|
||||
private static final String RESERVED_SYMBOLS = "\\/:*?\"<>|";
|
||||
|
||||
@Inject
|
||||
protected BackgroundWorker backgroundWorker;
|
||||
|
||||
@ -81,11 +83,11 @@ public class DesktopExportDisplay implements ExportDisplay {
|
||||
}
|
||||
|
||||
String dialogMessage = messages.getMessage(getClass(), "export.saveFile");
|
||||
String correctName = StringUtils.replaceChars(fileName, RESERVED_SYMBOLS, "_");
|
||||
dialogMessage = String.format(dialogMessage, correctName);
|
||||
|
||||
final String finalFileName = correctName;
|
||||
String fileCaption = messages.getMessage(getClass(), "export.fileCaption");
|
||||
|
||||
dialogMessage = String.format(dialogMessage, fileName);
|
||||
|
||||
final String finalFileName = fileName;
|
||||
getFrame().getWindowManager().showOptionDialog(fileCaption, dialogMessage, Frame.MessageType.CONFIRMATION,
|
||||
new com.haulmont.cuba.gui.components.Action[]{
|
||||
new AbstractAction("action.openFile", Status.PRIMARY) {
|
||||
|
Loading…
Reference in New Issue
Block a user