mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #1993 from arunnattarayan/patch-1
Export to library produces empty folder when name has a trailing slash
This commit is contained in:
commit
a6ef755139
@ -447,7 +447,10 @@ RED.library = (function() {
|
|||||||
click: function() {
|
click: function() {
|
||||||
//TODO: move this to RED.library
|
//TODO: move this to RED.library
|
||||||
var flowName = $("#node-input-library-filename").val();
|
var flowName = $("#node-input-library-filename").val();
|
||||||
if (!/^\s*$/.test(flowName)) {
|
flowName = flowName.trim();
|
||||||
|
if(flowName === "" || flowName.endsWith("/")) {
|
||||||
|
RED.notify(RED._("library.invalidFilename"),"warning");
|
||||||
|
} else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:'library/flows/'+flowName,
|
url:'library/flows/'+flowName,
|
||||||
type: "POST",
|
type: "POST",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user