New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to library produces empty folder when name has a trailing slash #1985

Open
DSiekmeier opened this Issue Nov 28, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@DSiekmeier

DSiekmeier commented Nov 28, 2018

What are the steps to reproduce?

  • Start Node-RED
  • Create a flow and try to export it to library
  • Name the library foo/ (with trailing slash)

What happens?

  • The trailing slash leads Node-RED to create an empty folder in the library menu
  • The exported flow cannot be imported anymore

What do you expect to happen?

  • Node-RED should maybe ignore the trailing slash and do not create an empty folder

Please tell us about your environment:

  • Node-RED version: 0.19.5
  • node.js version: 6.11.4
  • npm version: 3.5.2
  • Platform/OS: (X)Ubuntu 16.04
  • Browser: Firefox 61.0.1

Also had this behaviour with Node-RED 0.18.4 and a NodeJS version 8.x.

@arunnattarayan

This comment has been minimized.

Contributor

arunnattarayan commented Nov 29, 2018

DSiekmeier file name wont end with trailing slash. it consider as path and expecting file name after that.

@DSiekmeier

This comment has been minimized.

DSiekmeier commented Nov 29, 2018 •

DSiekmeier file name wont end with trailing slash. it consider as path and expecting file name after that.

Sure: this is how it works. But nothing stops the user from omitting the "file name" part. I think it is a good practice to validate user inputs as good as possible. And I think (although I am not sure) this issue should be quite easy to avoid.

Kind Regards

@knolleary knolleary added this to the 0.20 milestone Dec 13, 2018

@knolleary knolleary added the fixed label Dec 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment