Skip to content

Commit

Permalink
Merge pull request #1993 from arunnattarayan/patch-1
Browse files Browse the repository at this point in the history
Export to library produces empty folder when name has a trailing slash
  • Loading branch information
knolleary committed Dec 13, 2018
2 parents 2f93bb9 + 7b80ae4 commit a6ef755
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion editor/js/ui/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,10 @@ RED.library = (function() {
click: function() {
//TODO: move this to RED.library
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({
url:'library/flows/'+flowName,
type: "POST",
Expand Down

0 comments on commit a6ef755

Please sign in to comment.