tidy up file save as.

pull/8/head
Dave Conway-Jones 2018-08-25 23:17:01 +01:00
rodzic 8146a0a003
commit 81996a2691
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 9E7F9C73F5168CD4
1 zmienionych plików z 8 dodań i 2 usunięć

10
main.js
Wyświetl plik

@ -206,10 +206,16 @@ function saveFlow() {
defaultPath: fileName
}, function(file_path) {
if (file_path) {
var flo = JSON.stringify(RED.nodes.getFlows());
var flo = JSON.stringify(RED.nodes.getFlows().flows);
fs.writeFile(file_path, flo, function(err) {
if (err) { dialog.showErrorBox('Error', err); }
else { dialog.showErrorBox('OK', "Flow file saved as\n\n"+file_path); }
else {
dialog.showMessageBox({
icon: "nodered.png",
message:"Flow file saved as\n\n"+file_path,
buttons: ["OK"]
});
}
});
}
});