Robert-W / grunt-ftp-push

Deploy files to an FTP server as part of your Grunt workflow.
MIT License
39 stars 14 forks source link

Suggestion: use of node path module #30

Closed rarila closed 9 years ago

rarila commented 9 years ago

I'd like to suggest using the node path module (the path.posix part) sometime in some refactoring in the future (as I know we all are short of spare time).

I believe it could greatly simplifiy the path handling (normalize(), join(), dirname(), …) and make it more secure. E.g. I don't know if grunt-ftp-push would handle paths like /foo/./..///bar gracefully.

Robert-W commented 9 years ago

Probably would not handle that path gracefully (although I have not tried one like that so your guess is as good as mine). I agree that this will simplify the path handling and would be a good addition. I have a new branch on my local machine at home I have been meaning to push up which will have unit tests and I can include this in that one as well

Robert-W commented 9 years ago

the path module is in 0.4.0 and 0.4.1. I have committed another update to master which should be released relatively soon as 0.4.2, and it uses path.posix instead of just path. Closing this as it will be released soon.

rarila commented 9 years ago

:+1: Great to hear!

rarila commented 9 years ago

Works, thanks! Could you please tag 0.4.2!

Robert-W commented 9 years ago

Yup will do, I'm gonna try to deploy it this week sometime while Im at school